carenot
Hi,
I'm using LS behind a NAT. What I observe is that when LS is under load, there is a large number of sockets in TIME_WAIT state on the server, and the clients start to receive "connection refused" errors.
This happens both when the clients are making frequent connection/disconnections (but very few subscriptions), and also very few connections but frequent subs/unsubs.
This made me think that the server is closing all TCP connections, since only the FIN initiating party enters TIME_WAIT state. This is understandable for disconnections, because it is done asynchronously (client issuing control command and the server closes the connection).
But I don't understand why this also happens for unsubscriptions. Is it because LS is using HTTP 1.0? What HTTP version is used by different versions of LS?
Thanks
Giuseppe Corti
Hi carenot,
First I want to confirm that Lightstreamer uses HTTP 1.1 (or HTTP 1.0 only if explicitly requested by the client); and that the server does not close a connection on its own initiative at least in normal scenario.
Now, I am not sure if you're complaining that due to too many sockets in TIME_WAIT you end up running out of available TCP ports and consequently you got connections rejected.
Or, on the contrary, that since the server is simply refusing too many connections figuring out if TIME_WAITs are related in some way.
By the way, could you confirm whether you are leveraging the <server_pool_max_queue> parameter (in lightstreamer_conf.xml)? Indeed, in this case I confirm that the Lightstreamer server, as long as the number is exceeded, keeps waiting the accept loops of all the listening sockets.
Regards,
Giuseppe