# DVR streamTimeout unexpectedly

**URL:** <https://community.wowza.com/t/dvr-streamtimeout-unexpectedly/44824>\
**Category:** Wowza Streaming Engine\
**Created:** [April 20, 2015, 3:48pm UTC](https://community.wowza.com/t/dvr-streamtimeout-unexpectedly/44824 "2015-04-20T15:48:34Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![trong\_trong](https://avatars.discourse-cdn.com/v4/letter/t/dec6dc/32.png) [@trong\_trong](https://community.wowza.com/u/trong_trong)\
**Post date:** [April 20, 2015, 3:48pm UTC](https://community.wowza.com/t/dvr-streamtimeout-unexpectedly/44824/1 "2015-04-20T15:48:34Z")

</div>

Hi!

I’m using DVR’s streamTimeout setting to clear the DVR cache 15 seconds after a stream ends:

```auto
<Property>
	<Name>streamTimeout</Name>
	<Value>15000</Value>
	<Type>Integer</Type>
</Property>

```

My question is, what exactly is the event that triggers this timeout? Is it stream unpublish, or client disconnects, or what is it? Does the DVR clear 15s after the unpublish event?

The reason I’m asking is because I’ve been running into a weird situation where the timeout would kick in for no apparent reason. Normally 15s before the cache clears (at 23:09:50) I’d see a console output from this method:

```auto
public void onUnPublish(IMediaStream stream, String streamName, boolean isRecord, boolean isAppend)

```

but in this case the nearest output was at 23:07:20, and unrelated.

```auto
2015-04-20 23:07:20 UTC comment server INFO 200 - W
ASA onHTTPSessionDestroy: 1821994150 - - - 5822.267 -
        - - - - - - - - - -
        - - - - - - - - - -
        - - - -
2015-04-20 23:09:50 UTC comment server INFO 200 - D
vrStreamManagerBase [live/_definst_/5454601949f818b16e90c404] : Timeout occurr
ed. Destroying DVR recorder. - - - 405156.497 - -
        - - - - - - - - - -
        - - - - - - - - - -
        - - -
2015-04-20 23:09:50 UTC comment server INFO 200 - L
iveStreamDvrRecorderBase.shutdown[live/_definst_/5454601949f818b16e90c404] -
        - - 405156.498 - - - - - -
        - - - - - - - - - -
        - - - - - - - - -
2015-04-20 23:09:50 UTC comment server INFO 200 - DvrStreamManagerBase [live/_definst_/5454601949f818b16e90c404] : Timeout occurred. Destroying DVR packetizer. - - - 405156.498 - -
        - - - - - - - - - -
        - - - - - - - - - -
        - - -
2015-04-20 23:09:50 UTC comment server INFO 200 - DvrStreamManagerBase.shutdown[live/_definst_/5454601949f818b16e90c404] - - - 405156.499 - - - - - - - - - - - - - - - - - - - - - - - - -
2015-04-20 23:09:50 UTC comment server INFO 200 - D
vrStreamManagerBase.removeStreamStore[live/_definst_/5454601949f818b16e90c404]
 : stream:{DvrStreamStoreBase streamName:5454601949f818b16e90c404.29 isLoaded:true canPlay:true canRecord:true hasEncryption:false isLive:false isRecording:false isRecordingPaused:false props:{Properties: streamTimeout: 15000, dvrMinimumAvailableChunks: 5, dvrChunkDurationMinimum: 5000, dvrAllowableAVPacketDelta: 2000, dvrPacketSortTime: 2000, isDvrPacketizer: true}]. - - -
        405156.499 - - - - - - - -
        - - - - - - - - - -
        - - - - - - -
2015-04-20 23:09:50 UTC comment server INFO 200 - MediaStreamMap.removeLiveStreamPacketizer[live/_definst_/5454601949f818b16e90c404]: Destroy live stream packetizer: dvrstreamingpacketizer - - -
        405156.499 - - - - - - - -
        - - - - - - - - - -
        - - - - - - -

```

Follow up question. If the encoder for some reason stops sending data to wowza for X seconds, without unpublish firing, could this trigger the streamTimeout? How long is X?

Thanks

Trong

---

<div class="post-metadata">

**Author:** ![Paul\_Shields](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/paul_shields/32/390_2.png) [@Paul\_Shields](https://community.wowza.com/u/Paul_Shields)\
**Post date:** [May 26, 2015, 3:53pm UTC](https://community.wowza.com/t/dvr-streamtimeout-unexpectedly/44824/2 "2015-05-26T15:53:43Z")

</div>

Hi,

streamTimeout is explained in the Wowza [nDVR Advanced Config](https://www.wowza.com/docs/how-to-do-advanced-configuration-for-wowza-ndvr) page.

Specifically, it’s defined as:

> The amount of time, in milliseconds (ms), that Wowza nDVR will wait for packets until it stops recording. The default value is 300,000 ms (5 minutes). This timeout is meant to account for when encoders disconnect and then restart. The value should be a non-zero value or else your recording will stop whenever there is no data.
> 
> So the trigger is essentially zero packets arriving within the StreamTimeout window.
> 
> Example,
> 
> ```auto
> <Properties>
> <Property>
> <Name>streamTimeout</Name>
> <Value>300000</Value>
> <Type>Integer</Type>
> </Property>
> </Properties>
> 
> ```
