# Programatically increase timeout for cupertino stream?

**URL:** <https://community.wowza.com/t/programatically-increase-timeout-for-cupertino-stream/34716>\
**Category:** Wowza Streaming Engine\
**Created:** [July 19, 2010, 2:20pm UTC](https://community.wowza.com/t/programatically-increase-timeout-for-cupertino-stream/34716 "2010-07-19T14:20:14Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jay\_Charles](https://avatars.discourse-cdn.com/v4/letter/j/c89c15/32.png) [@Jay\_Charles](https://community.wowza.com/u/Jay_Charles)\
**Post date:** [July 19, 2010, 2:20pm UTC](https://community.wowza.com/t/programatically-increase-timeout-for-cupertino-stream/34716/1 "2010-07-19T14:20:14Z")

</div>

I have an application that acts as an edge server for an FMIS live stream.

In order to prevent bad data and timeout problems when clients first connect to the edge instance (when the instance hasn’t yet started), I’m waiting for the first audio or video packet to come in from the origin before accepting the RTP / HTTP session.

This works fine for RTSP, but if a cupertino stream client is the first to connect, the HTTPStreamer times out. The error I get in the log is:

HTTPStreamerAdapterCupertinoStreaming.service: Request timeout: 8000

Is there any way I can programatically adjust that timeout in my module?

---

<div class="post-metadata">

**Author:** ![Charlie\_Good](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/charlie_good/32/383_2.png) [@Charlie\_Good](https://community.wowza.com/u/Charlie_Good)\
**Post date:** [July 19, 2010, 3:57pm UTC](https://community.wowza.com/t/programatically-increase-timeout-for-cupertino-stream/34716/2 "2010-07-19T15:57:23Z")

</div>

You can change them on a per-application basis by adding the following properties to HTTPStreamer/Properties:

```auto
<Property>
	<Name>newSessionTimeout</Name>
	<Value>8000</Value>
	<Type>Integer</Type>
</Property>
<Property>
	<Name>validSessionTimeout</Name>
	<Value>25000</Value>
	<Type>Integer</Type>
</Property>
<Property>
	<Name>streamStreamType</Name>
	<Value>httpstreamer</Value>
</Property>
<Property>
	<Name>repeaterStreamType</Name>
	<Value>httprepeater-edge</Value>
</Property>
<Property>
	<Name>requestTimeout</Name>
	<Value>12000</Value>
	<Type>Integer</Type>
</Property>
<Property>
	<Name>tcpTimeToLive</Name>
	<Value>9000</Value>
	<Type>Integer</Type>
</Property>
<Property>
	<Name>tcpKeepAliveTimeout</Name>
	<Value>9000</Value>
	<Type>Integer</Type>
</Property>

```

Charlie

---

<div class="post-metadata">

**Author:** ![Bojan\_Jovanovic](https://avatars.discourse-cdn.com/v4/letter/b/94ad74/32.png) [@Bojan\_Jovanovic](https://community.wowza.com/u/Bojan_Jovanovic)\
**Post date:** [February 21, 2012, 4:33pm UTC](https://community.wowza.com/t/programatically-increase-timeout-for-cupertino-stream/34716/3 "2012-02-21T16:33:22Z")

</div>

Hi,

it takes ~25 seconds for the destroy/disconnect messages to be genearted after the HLS player is stopped.

My guess is that this is defined by this parameter:

validSessionTimeout

25000

Integer

correct?

I lowered it to 10 seconds and the running session still needs 25 seconds for timeout after stop on player?

Thanks!

---

<div class="post-metadata">

**Author:** ![Bojan\_Jovanovic](https://avatars.discourse-cdn.com/v4/letter/b/94ad74/32.png) [@Bojan\_Jovanovic](https://community.wowza.com/u/Bojan_Jovanovic)\
**Post date:** [February 22, 2012, 8:06am UTC](https://community.wowza.com/t/programatically-increase-timeout-for-cupertino-stream/34716/4 "2012-02-22T08:06:28Z")

</div>

Hi,

I’ve lowered the time needed for disconect to arrive to approx. 500ms with these parameters:

newSessionTimeout

3000

Integer

validSessionTimeout

500

Integer

So far all seems to work fine. When the user disconnects, the destroy/disconnect message is generated right away.

---

<div class="post-metadata">

**Author:** ![Richard\_Lanham](https://avatars.discourse-cdn.com/v4/letter/r/c68b51/32.png) [@Richard\_Lanham](https://community.wowza.com/u/Richard_Lanham)\
**Post date:** [February 21, 2012, 10:17pm UTC](https://community.wowza.com/t/programatically-increase-timeout-for-cupertino-stream/34716/5 "2012-02-21T22:17:11Z")

</div>

I think it is actually the chunk duration \* number of chunks in cache on the device. This is configurable through these Cupertino segment settings. Look at the 3 Cupertino\*ChunkCount settings:

[https://www.wowza.com/docs/how-to-configure-apple-hls-packetization-cupertinostreaming](https://www.wowza.com/docs/how-to-configure-apple-hls-packetization-cupertinostreaming)

Richard

---

<div class="post-metadata">

**Author:** ![Jay\_Charles](https://avatars.discourse-cdn.com/v4/letter/j/c89c15/32.png) [@Jay\_Charles](https://community.wowza.com/u/Jay_Charles)\
**Post date:** [July 20, 2010, 7:43am UTC](https://community.wowza.com/t/programatically-increase-timeout-for-cupertino-stream/34716/6 "2010-07-20T07:43:49Z")

</div>

Thanks Charlie. Upping the newSessiontimeout value to 16000 seems to do the trick.

---

<div class="post-metadata">

**Author:** ![Streaming\_Enthusiast](https://avatars.discourse-cdn.com/v4/letter/s/a183cd/32.png) [@Streaming\_Enthusiast](https://community.wowza.com/u/Streaming_Enthusiast)\
**Post date:** [August 13, 2017, 11:09pm UTC](https://community.wowza.com/t/programatically-increase-timeout-for-cupertino-stream/34716/7 "2017-08-13T23:09:38Z")

</div>

Hi @Bojan Jovanovic I tried to add the above two properties in same in my application at /Root/Application/HTTPStreamer but it didn’t work. The destroy/disconnect message is generated after about 25 to 30 seconds.

Is there any additional configuration that I am missing? Thanks in advance for your help!
