Results 1 to 4 of 4
  1. #1
    Member
    Join Date
    Nov 2008
    Location
    Boston
    Posts
    24

    <content_length>

    Hi,

    I'd like to set the default value for <content_length> to a large number, say 300000000. The purpose is to keep the persistent connection open for a longer time.

    Is there any downside of doing this?

    Thanks,
    Richard

  2. #2
    Administrator
    Join Date
    Jul 2006
    Location
    Milan, Italy
    Posts
    517
    Hi Richard,

    Connections are reinitiated under the hood to flush all the buffers in the pipeline, based on the content_length setting. This is completely transparent to both the user and the application. Why should you need to increase the content_length?

    In case you notice disconnections when exhausting the content_length, that means the client is taking more than 5 seconds to reattach to the existing session via a new connection. In other words, there are serious problems on the network or on the client. If you are aware of these situations, you may want to increase the <session_timeout_millis> parameter.

    To answer your question, the higher the content_length, the more memory the browser will consume and the more time it will employ to flush the buffers. This only applies to Web browser clients. All the other kind of clients can use arbitrary large content_lengths.

  3. #3
    Member
    Join Date
    Nov 2008
    Location
    Boston
    Posts
    24
    Hi Alessandro,

    I wanted to increase the content_length so that the disconnection doesn't occur too frequently. Please see my another post for the issue I am facing:

    http://www.lightstreamer.com/vb/show...ted=1#post1834

    You mentioned to increase the <session_timeout_millis>. But the disconnection as signaled by a STREAMING status change happens immediately after the reaching of 300K content length. The time gap between the close of the old connection and the start of a new connection seems shorter than 5 seconds. Is this normal?

    I can try to bump up <session_timeout_millis> to 15 seconds to see if I still get disconnection. Is there any guideline on how an optimum <session_timeout_millis> should be determined?

    Thanks,
    Richard

  4. #4
    Administrator
    Join Date
    Jul 2006
    Location
    Milan, Italy
    Posts
    517
    Richard,

    5 secs. for <session_timeout_millis> is usually more than enough, as it should be higher than the typical Internet round-trip time.

    As explained in the other thread you mentioned, you probably have some other issue, which is unrelated to both the <content-length> and the <session_timeout_millis>.

    Cheers,

    Alessandro

 

 

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 03:54 PM.