Results 1 to 2 of 2

Hybrid View

  1. #1

    TIME_WAIT and HTTP version

    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

  2. #2
    Administrator
    Join Date
    Feb 2012
    Location
    Milano
    Posts
    716
    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

 

 

Similar Threads

  1. Handle HTTP GET request and execute Java logic
    By mello151 in forum Adapter SDKs
    Replies: 2
    Last Post: June 13th, 2014, 03:22 AM
  2. Presto (4.0.2) and JS Client Version 6.0
    By rebatch in forum Client SDKs
    Replies: 1
    Last Post: November 30th, 2012, 09:37 AM
  3. cross domain between http and https
    By riwang in forum Client SDKs
    Replies: 1
    Last Post: January 7th, 2009, 11:56 AM
  4. Replies: 0
    Last Post: December 22nd, 2006, 01:18 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT +1. The time now is 09:56 PM.