For anyone who is interested in closing the NetConnection when closing the popup, this is a workaround for MSIE:
Registering an ExternalInterface method that closes the NetConnection and calling it on the browser onBeforeUnload event works nice!
FireFox does not need this. Are there any other browsers that do not properly close the Netconnection when running Flash in a popup?
Tom Sanders
Tom, Thanks for this very useful tip!
Charlie
Hello there…Yep it works…often…but not always!
We uses both onBeforeUnload and Onunload events…But some client still does not disconnect…first after 10-20min…We really do not know what to do
We are not using popups…but just IE 7.0 and XP…and tabpanes…
It is really driving us crazy…please some body know the answer…
Charlie: Is there not some setting in Wowza that we can fine tune so the detection of when a connection is disconnected gets more accurate?
/PabloPablo
You can change the ValidationFrequency and PingTimeout values in conf/VHost.xml but be careful. Setting these values too low may disconnect good connections:
ValidationFrequency: Time in milliseconds the server will test the connection between the client and the server after the last time the server has received data from the client. The timer is reset each time data is received from the cleint.
PingTimeout: Time in milliseconds the server will wait for a response to an RTMP ping message.
Charlie
That sounds very strange. All I can think of is that there is some proxy server in the middle that is somehow keeping the connection alive.
Charlie
Hi Charlie…
Well the settings looks like:
60000
12000
20000
We have never changed any value…and it does make much sense to me to change them…now when it says 12s and 20s…when the onDisconnect is fired after 10-20 minutes…?
We dealt with the IE7/Vista issue this way: http://blog.vokle.com/index.php/2009/03/10/why-ie-doesnt-drop-flash-netconnections-netstreams-and-how-to-fix-it/.
Right now though I have one user connecting over FF3/XP and when they close the tab/browser/computer Wowza doesn’t timeout the connection for around 20 minutes.
Anyone have any thoughts on how to narrow down the issue or things to look for on the client or server side to figure it out? Here’s my VHost.xml file:
<Root>
<VHost>
<HostPortList>
<HostPort>
<ProcessorCount>4</ProcessorCount>
<IpAddress>*</IpAddress>
<Port>1935</Port>
<SocketConfiguration>
<ReuseAddress>true</ReuseAddress>
<!-- suggested settings for video on demand applications -->
<ReceiveBufferSize>24000</ReceiveBufferSize>
<SendBufferSize>65000</SendBufferSize>
<!-- suggest settings for low latency chat and video recording applications
<ReceiveBufferSize>16000</ReceiveBufferSize>
<SendBufferSize>16000</SendBufferSize>
-->
<KeepAlive>true</KeepAlive>
<!-- <TrafficClass>0</TrafficClass> -->
<!-- <OobInline>false</OobInline> -->
<!-- <SoLingerTime>-1</SoLingerTime> -->
<!-- <TcpNoDelay>false</TcpNoDelay> -->
</SocketConfiguration>
<HTTPProvider>
<!-- <BaseClass>com.wowza.wms.http.HTTPServerVersion</BaseClass> -->
<BaseClass>com.wowza.wms.http.HTTPServerInfoXML</BaseClass>
<!-- <BaseClass>com.wowza.wms.http.HTTPConnectionInfo</BaseClass> -->
<Properties>
<!--
<Property>
<Name></Name>
<Value></Value>
</Property>
-->
</Properties>
</HTTPProvider>
</HostPort>
<!--
<HostPort>
<ProcessorCount>4</ProcessorCount>
<IpAddress>*</IpAddress>
<Port>80</Port>
<SocketConfiguration>
<ReuseAddress>true</ReuseAddress>
<ReceiveBufferSize>24000</ReceiveBufferSize>
<SendBufferSize>65000</SendBufferSize>
<KeepAlive>true</KeepAlive>
</SocketConfiguration>
<HTTPProvider>
<BaseClass>com.wowza.wms.http.HTTPServerVersion</BaseClass>
<Properties>
</Properties>
</HTTPProvider>
</HostPort>
-->
<!--
<HostPort>
<ProcessorCount>4</ProcessorCount>
<IpAddress>127.0.0.1</IpAddress>
<Port>443</Port>
<SSLFactoryClass>com.mycompany.module.SampleSSLContextFactory</SSLFactoryClass>
<SocketConfiguration>
<ReuseAddress>true</ReuseAddress>
<ReceiveBufferSize>24000</ReceiveBufferSize>
<SendBufferSize>65000</SendBufferSize>
<KeepAlive>true</KeepAlive>
</SocketConfiguration>
<HTTPProvider>
<BaseClass>com.wowza.wms.http.HTTPServerVersion</BaseClass>
<Properties>
</Properties>
</HTTPProvider>
</HostPort>
-->
</HostPortList>
<HandlerThreadPool>
<PoolSize>100</PoolSize>
</HandlerThreadPool>
<TransportThreadPool>
<PoolSize>100</PoolSize>
</TransportThreadPool>
<IdleWorkers>
<WorkerCount>4</WorkerCount>
<CheckFrequency>50</CheckFrequency>
<MinimumWaitTime>5</MinimumWaitTime>
</IdleWorkers>
<NetConnections>
<ProcessorCount>8</ProcessorCount>
<IdleFrequency>250</IdleFrequency>
<SocketConfiguration>
<ReuseAddress>true</ReuseAddress>
<ReceiveBufferSize>65000</ReceiveBufferSize>
<SendBufferSize>24000</SendBufferSize>
<KeepAlive>true</KeepAlive>
<!-- <TrafficClass>0</TrafficClass> -->
<!-- <OobInline>false</OobInline> -->
<!-- <SoLingerTime>-1</SoLingerTime> -->
<!-- <TcpNoDelay>false</TcpNoDelay> -->
</SocketConfiguration>
</NetConnections>
<HTTPTunnel>
<KeepAliveTimeout>2000</KeepAliveTimeout>
</HTTPTunnel>
<Client>
<ClientTimeout>90000</ClientTimeout>
<IdleFrequency>250</IdleFrequency>
</Client>
<!-- RTP/Authentication/Methods defined in Authentication.xml. Default setup includes; none, basic, digest -->
<RTP>
<DatagramConfiguration>
<ReuseAddress>true</ReuseAddress>
<ReceiveBufferSize>65000</ReceiveBufferSize>
<!-- <MulticastBindToAddress>true</MulticastBindToAddress> -->
<!-- <TrafficClass>0</TrafficClass> -->
<!-- <MulticastTimeout>250</MulticastTimeout> -->
</DatagramConfiguration>
<DatagramStartingPort>6970</DatagramStartingPort>
</RTP>
<Application>
<ApplicationTimeout>6000</ApplicationTimeout>
<PingTimeout>12000</PingTimeout>
<ValidationFrequency>20000</ValidationFrequency>
<MaximumPendingWriteBytes>0</MaximumPendingWriteBytes>
<MaximumSetBufferTime>60000</MaximumSetBufferTime>
</Application>
<Properties>
<!-- Properties defined here will be added to the IVHost.getProperties() collection -->
<Property>
<Name>VideoAllowed</Name>
<Value>true</Value>
</Property>
</Properties>
</VHost>
</Root>
Just a belated follow-up. It wasn’t a proxy issue, but we upgraded to Wowza 1.7.0 and the problem was resolved.