This is an old revision of the document!


Understanding "keep alive" settings

LSWS turn on “keep alive” setting by default. It is server level configuration and can not be controlled/overridden at virtual host level. There is no “yes/no” “on/off” option under LSWS Admin Console→ Server → Tuning → Connection section. However, you can control it through “Max Keep-Alive Requests” “Smart Keep-Alive” “Keep-Alive Timeout (secs)” settings. Please bear in mind that you don't need to enable “Smart Keep-Alive” to be able to use “Keep-Alive”. Actually, “Smart Keep-Alive” is designed to exclude some types of files from “Keep-Alive” connections. For example, set keep-alive connections for requests of JavaScript, CSS Style Sheet, image files only, excluding other type of files. With latest release of 5.1.8, it only excludes HTML from keep alive. If you would like to make everything, turn off “Smart Keep-Alive”.

How to control “Keep A-alive”?

Set “Max Keep-Alive Requests” to “0” or “1” will disable “keep-alive”. Leave as default if you have no special requirement. Adjust it to a little higher when you would like to fine tune your server. Or even adjust it to BIG value, like “100,000”, when you do a benchmark test.

Default Keep-Alive Timeout (secs) is “5”. You don't need to adjust it unless you have special requirement.

Sometimes you may be wondering why you did not see Keep-alive header for a particular URL. Is the “keep-alive” on? Yes, it is on by default. Don't try to turn on “Smart Keep-Alive” since it is actually to turn off some files. So turn off “ “Smart Keep-Alive”. “Max Keep-Alive Requests” setting may be increased. Also PHP external app “Soft Limit” may also limit “keep-alive” connections.

  • Admin
  • Last modified: 2016/09/15 21:39
  • by Jackson Zhang