Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Last revision Both sides next revision
litespeed_wiki:config:keep_alive [2016/09/16 13:43]
Jackson Zhang
litespeed_wiki:config:keep_alive [2016/09/16 19:14]
Rob Holda
Line 1: Line 1:
 ====== Understanding "keep alive" settings ====== ====== Understanding "keep alive" settings ======
-LSWS turns on "keep alive" ​setting ​by default. There is no "​yes/​no"​ "​on/​off"​ option in LSWS configuration,​ however, you can turn it off or control it through "Max Keep-Alive Requests"​ "Smart Keep-Alive"​ "​Keep-Alive Timeout (secs)"​ settings (under LSWS Admin Console->​ Server -> Tuning -> Connection section).+LiteSpeed Web Server ​turns on "keep alive" by default. There is no "​yes/​no" ​or "​on/​off"​ option in LSWS configuration,​ however, you can turn it off or control it through ​the "Max Keep-Alive Requests"​"Smart Keep-Alive"​, and "​Keep-Alive Timeout (secs)"​ settings (under ​the LSWS Admin Console -> Server -> Tuning -> Connection section). 
 {{ :​litespeed_wiki:​config:​keep-alive.png?​nolink&​300 |}} {{ :​litespeed_wiki:​config:​keep-alive.png?​nolink&​300 |}}
-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 "turn off" Keep-Alive for some types of files, instead of "​turning on". For example, ​set keep-alive for requests of JavaScript, CSS Style Sheet, image filesexcluding ​other type of files,such as HTML. Since release 5.1.8 , it will only exclude HTML from keep alive. If you would like to Keep-alive everything, ​better ​turn off "Smart Keep-Alive"​.+ 
 +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 "turn off" Keep-Alive for some types of files, instead of "​turning ​it on". For example, ​it will "​enable" ​keep-alive for JavaScript, CSS, image file requestsand disable it for other type of files, such as HTML files. Since release 5.1.8, it will only exclude HTML from keep-alive. If you would like to use keep-alive ​for everything, ​you must turn off "Smart Keep-Alive"​.
  
 "​Keep-alive"​ is server level configuration and can not be controlled at virtual host level.  ​ "​Keep-alive"​ is server level configuration and can not be controlled at virtual host level.  ​
  
-How to control ​"Keep A-alive"?​ +==== Controlling ​"​Keep-Alive" ​====
- +
-Set "​Max ​Keep-Alive ​Requests"​ to "​0"​ will disable "​keep-alive"​. Leave as default if you have no special requirement. Adjust it to a little higher when you have some need. Or even adjust it to a 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. To toubleshoot it, you may like to turn off "Smart Keep-Alive"​ and increase "Max Keep-Alive Requests"​ setting. Sometimes PHP external app "Soft Limit" may also limit "​keep-alive"​ connections. Increasing "Soft Limit" ​may help the troubleshooting.  +
- +
- +
  
 +Setting "Max Keep-Alive Requests"​ to "​0"​ will disable "​keep-alive"​. You should leave this as the default value if you have no special requirements,​ increasing it slightly as needed or even adjusting it to a large value, like "​100,​000",​ when you do a benchmark test.
  
 +The default value for Keep-Alive Timeout (secs) is "​5"​. You don't need to adjust this either unless you have some special requirements.
  
 +Sometimes you may not see a Keep-alive header for a particular URL. This does not mean that "​keep-alive"​ is off. To troubleshoot this you may turn off "Smart Keep-Alive"​ and increase the value of the "Max Keep-Alive Requests"​ setting. Sometimes a PHP external application "Soft Limit" may also limit "​keep-alive"​ connections. Increasing this "Soft Limit" may also fix this issue.
  • Admin
  • Last modified: 2016/09/19 13:44
  • by Rob Holda