Difference between timeouts

Discussion in 'Ruby/Rails' started by iwarshak, Feb 20, 2008.

  1. iwarshak

    iwarshak New Member

    Maybe it's just me, but the documentation about the different types of timeout settings is confusing.Specifically, I don't see how Max Idle Time and Connection Keepalive Timeout are related. Perhaps describing a real world scenario would help explain the difference.

    Also, will the Environment variables that you set on the Ruby Rails tab override the settings that you set in the text fields?
  2. mistwang

    mistwang LiteSpeed Staff

    "Max Idle time" tells LSWS when to kill the process/application, while "Connection Keepalive Time" tells LSWS when to close the connection, while the process serving the connection may still running, ready to serve next connection.

    Those configurations control web server behavior, while environment variables control the behavior of the application (external processes).
  3. iwarshak

    iwarshak New Member

    So "Max Idle Time" has a different function than LSAPI_MAX_IDLE?

    From reading the documentation, on a dedicated server, setting Max Idle Time to -1 will make sure that the external applications never exit. If Max Idle Time is set to -1, what happens when the Connection Keepalive Timeout is reached.

    Thanks
    Ian
  4. mistwang

    mistwang LiteSpeed Staff

    "Max Idle Time" tell LSWS how soon to kill the ruby process.
    "LSAPI_MAX_IDLE" tell the ruby process how soon to exit by itself.
  5. iwarshak

    iwarshak New Member

    If Max Idle Time is -1, would the Connection Keepalive Timeout ever be invoked?
  6. mistwang

    mistwang LiteSpeed Staff

    yes, "Connection Keepalive Time" tells LSWS when to close the connection between the web server and external application.
  7. iwarshak

    iwarshak New Member

    Thanks. Perhaps some sort of technical document that describes how LSAPI works and interacts with LS would be useful. Does any such thing exist?
  8. iwarshak

    iwarshak New Member

    I did some experimenting and came up with the following descriptions regarding timeouts. Is this accurate?


    Environment: LSAPI_MAX_IDLE = how long a ruby child process will wait before the master ruby process terminates it
    Environment: LSAPI_MAX_REQS = the number of requests a child process will handle before it is terminated

    MAX_IDLE_TIME = how long the master ruby process will wait before terminating completely
    Connection Keepalive Timeout = how long a Litespeed will keep a connection open with a process before disconnecting with that process. The process does not die.
  9. mistwang

    mistwang LiteSpeed Staff

    Yes, that's correct. Our documentation should have something similar.
    Are you interested in working for us as a technical writer? ;)

Share This Page