Howdy folks. I have possibly one of the dumbest questions ever for you.
Why use Apache keep-alive?
I've read a whole lot of posts saying to have it on. The tuning folks say to turn it on. I've been told by tech support here to have it on. And for the past several years, I've had it turned on. Fast forward to recent times. I'd been having an issue with pages sometimes taking forever to load, but hitting refresh loaded the page instantly. Sometimes there'd be a 1-3 second delay before the page started loading, then loaded promptly. It was annoying at best. So after a few hours of reading others having the same problem with no resolution, I decided to go through the http.conf file, one variable at a time, tweaking things here and there. What I found was my last expectation. Disabling keep-alive not only eliminated the problem completely, it actually sped the site up considerably. Why? I read into how keep-alive works. The first big thing I saw; keep-alive only works with files with finite sizes. It will not work with dynamic pages (IE: PHP). It seems as though to 1-3 second delay is Apache waiting for a keep-alive child process to timeout (suggested for 3 seconds by the vb.o tuning folks). That explains the 1-3 second delay. When the page hangs, it seems like Apache is processing what can be kept alive and what can't and just times out. So I've been running my site with keep-alive turned off for a little over a week now. It's much faster. I even had a few members ask me if we moved servers because they noticed how much faster things were loading.
So back to the question, why use Apache keep-alive?
Why use Apache keep-alive?
I've read a whole lot of posts saying to have it on. The tuning folks say to turn it on. I've been told by tech support here to have it on. And for the past several years, I've had it turned on. Fast forward to recent times. I'd been having an issue with pages sometimes taking forever to load, but hitting refresh loaded the page instantly. Sometimes there'd be a 1-3 second delay before the page started loading, then loaded promptly. It was annoying at best. So after a few hours of reading others having the same problem with no resolution, I decided to go through the http.conf file, one variable at a time, tweaking things here and there. What I found was my last expectation. Disabling keep-alive not only eliminated the problem completely, it actually sped the site up considerably. Why? I read into how keep-alive works. The first big thing I saw; keep-alive only works with files with finite sizes. It will not work with dynamic pages (IE: PHP). It seems as though to 1-3 second delay is Apache waiting for a keep-alive child process to timeout (suggested for 3 seconds by the vb.o tuning folks). That explains the 1-3 second delay. When the page hangs, it seems like Apache is processing what can be kept alive and what can't and just times out. So I've been running my site with keep-alive turned off for a little over a week now. It's much faster. I even had a few members ask me if we moved servers because they noticed how much faster things were loading.
So back to the question, why use Apache keep-alive?
Comment