Wowza Community

nDVR do not purge old files

We are running Wowza 3.1.0 build1410 on Win Server 2008 with following settings:

86400

append

We expect that all recorded files older than 1 day will be automatically deleted, however they’re not

Any suggestons? Wrong settings?

It should purge the individual chuck files, the m4f[avdm] files, that are older than one day.

Is it not? What are you seeing? What do you expect to see?

When the window duration is set to 24 hours, anything outside of that window is purged when recording. It will not delete previously recorded files that are on the disk from previous days. You would need to implement your own process of deleting recorded nDVR stores when they are no longer needed.

What do you mean by ‘purged’ here? You say it does purge anything outside of the 24hr window, but it does not delete ‘previously recorded files’?

How do we safely remove old material? Just completely remove the old directories and their content? Do we do this with an external cronjob or should we try and build this into the Wowza application?

The configuration guide doesn’t mention a lot about this while it’s pretty basic information. This is the only thing I found (and does not happen in our situation; it just stops recording because it reaches the limit?):

Material that falls outside this window, as time moves forward, is unavailable and purged from the file system.

We still have the problem: Wowza does not purge anything at all.

What happens now

…is that it doesn’t delete anything. Disk space use continually increases as it doesn’t purge anything now. Also if dvrMaximumRecordingLength isn’t set to a high value, it just plain stops recording with the error message “Maximum recording length of 2600000 seconds exceeded. Recording stopped.” … All of this is unwanted behavior.

Wanted behavior

…is that if we have (for example) a 1 day WindowDuration, it should purge files that are older than ~24 hours (so that we have a floating window that keeps moving forward in time). Used disk space will be approximately the same because it keeps deleting old files while adding new ones.

I noticed the manifest.txt for the streams contains the following info now:

true

true

false

3600

-1

-1

Shouldn’t the PurgeTime be set here? Does this indicate something is wrong with our application or the config? Can we set the PurgeTime somewhere? For example if we have a 24 hour WindowDuration we could set the PurgeTime to 25 hours so it would delete anything older than 25 hours?

I hope the problem and my question is clear. In short: I just want Wowza to automatically purge old DVR material from the filesystem while leaving new material in tact. This doesn’t happen now and I want to know how I can fix that.

When the window duration is set to 24 hours, anything outside of that window is purged when recording. It will not delete previously recorded files that are on the disk from previous days. You would need to implement your own process of deleting recorded nDVR stores when they are no longer needed.

-Lisa

When a WindowDuration is set (say 24 hours), nDVR will purge anything beyond the WindowDuration value. So as you record, data continues to be purged to maintain the 24 hour window. So if you were to play the recorded file, it would not exceed 24 hours which is separate from the file dates of the files on your system. This WindowDuration value applies to the duration length of the current recording. Other DVR Stores will not be affected. So if you have other DVR Stores on your hard drive that were recorded separately, even with the same WindowDuration, those Stores will not be affected by the purging related to the current recording. Any other file maintenance will need to be done outside of Wowza. To delete other Stores from your hard drive, you can delete the entire Store with a cronjob or any other method you use for system maintenance. We don’t have anything built-in to Wowza for this.

Thank you for the feedback on the documentation. I will add that to our DVR documentation list.

-Lisa

I think there is a confusion between the WindowDuration purging and general file purging. The Wowza nDVR property WindowDuration controls the length of the recording, but does not manage previous recorded stores. In your example, if you set the WindowDuration to 24 hours, the recording will be 24 hours long. As time continues past 24 hours and still less than the 30 hour default maximum, the recording will be the last 24 hours and the earliest chunks are deleted as the recording continues.

If ArchiveStrategy set to delete, then if there was a previous recording by the same name, it will be deleted and overwritten with the newer recording. If you have other DVR stores on your file system that were previously recorded, those DVR stores will NOT be affected by the WindowDuration property. In other words, a WindowDuration of 24 hours will not automatically delete recordings that were recording > 24 hours ago. As you have seen, many recordings uses up disk space rapidly - monitoring and managing of recordings is not part of nDVR functionality. Custom scripts would need to be written to your specification for clearing out unwanted recordings.

Please send a zip of [install-dir]/conf and logs directory, along with a sample problem store from [install-dir]/dvr for further analysis. Please reference this thread.

-Lisa

well, I suggest that folders older than 1 day should be completely deleted.

Now there are week old folders - some of them with couple of 0 kbit size m4fv and m4fva and manifest files, some with full files

As well as free disk space should remain constant ( after recording full 24hours cycle ), but after few days we run out of disk space.

We use it for IPTV - some 5 channels - streams being recorded this way