# rtmp session timeout

**URL:** <https://community.wowza.com/t/rtmp-session-timeout/460>\
**Category:** Wowza Streaming Engine\
**Created:** [April 28, 2010, 6:49pm UTC](https://community.wowza.com/t/rtmp-session-timeout/460 "2010-04-28T18:49:23Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/system/32/447_2.png) [@system](https://community.wowza.com/u/system)\
**Post date:** [April 28, 2010, 6:49pm UTC](https://community.wowza.com/t/rtmp-session-timeout/460/1 "2010-04-28T18:49:23Z")

</div>

Hi,

We’ve got about 30K concurrent rtmp connections on our network.

We have a very busy client that is setting up the rtmp net connection but only actually consumes media on a very few of them and the connections are hanging around for too long…

How do I reduce the amount of time an inactive rtmp connection stays alive for?

Thanks,

Joe

---

<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:** [April 28, 2010, 6:56pm UTC](https://community.wowza.com/t/rtmp-session-timeout/460/2 "2010-04-28T18:56:49Z")

</div>

You can set this in /conf/VHost.xml /Client /ClientTimeout

Value is milliseconds.

Richard

---

<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:** [March 14, 2012, 10:17am UTC](https://community.wowza.com/t/rtmp-session-timeout/460/3 "2012-03-14T10:17:36Z")

</div>

Client timeout only applies to unhealthy connections. If we have not recieved and data from the client through the normal validation process and ClientTimeout has elapsed then we will close the TCP connection. I would not suggest going much below 30 second (30000).

Charlie

---

<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:** [March 14, 2012, 1:11pm UTC](https://community.wowza.com/t/rtmp-session-timeout/460/4 "2012-03-14T13:11:21Z")

</div>

There is a little known configuration reference in the documentation folder where Wowza is installed, that I’m sure you will find interesting generally, and has this info on ClientTimeout and IdleFrequency:

> Client/[ClientTimeout, IdleFrequency]
> 
> ClientTimeout is the time in milliseconds the server will wait before shutting down a non-responding client connection. IdleFrequency is the time in milliseconds between idle events. For basic video on demand streaming a value of 250 milliseconds will provide the best reliability versus performance ratio. For live streaming a value of between 125 and 250 milliseconds is more desirable. It will increase the frequency at which media data is sent to the Flash client. If you adjust this value, be sure to also adjust the IdleWorkers/IdleFrequency to a value that is at least four times smaller.

Richard

---

<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:** [March 15, 2012, 1:52pm UTC](https://community.wowza.com/t/rtmp-session-timeout/460/5 "2012-03-15T13:52:22Z")

</div>

There is not a way to prevent such things from happening, but Wowza will clean up the loose connections.

Richard

---

<div class="post-metadata">

**Author:** ![ely\_celino](https://avatars.discourse-cdn.com/v4/letter/e/e5b9ba/32.png) [@ely\_celino](https://community.wowza.com/u/ely_celino)\
**Post date:** [March 13, 2012, 11:57pm UTC](https://community.wowza.com/t/rtmp-session-timeout/460/6 "2012-03-13T23:57:24Z")

</div>

Hi Richard,

What is the minimum value we can set for /conf/VHost.xml /Client /ClientTimeout? We are having problem with MAC rtmp clients not closing the rtmp connection.

Thank you

---

<div class="post-metadata">

**Author:** ![ely\_celino](https://avatars.discourse-cdn.com/v4/letter/e/e5b9ba/32.png) [@ely\_celino](https://community.wowza.com/u/ely_celino)\
**Post date:** [March 14, 2012, 5:11pm UTC](https://community.wowza.com/t/rtmp-session-timeout/460/7 "2012-03-14T17:11:32Z")

</div>

Thanks a lot Charlie. Anyway, are you guys familiar with the issue of OSX rtmps client not disconnecting properly from wowza after closing the window/browser? Any suggestions on how to fix it? Just found out that this issue happens only for rtmps and not in plain rtmp
