views:

604

answers:

3

hi

i want to use keep-alive feature of apache how can i use that with my host (.htaccess) and what should be the best values for the parameters like KeepAliveTimeout

Thanks

+1  A: 

It very much depends on your site and the amount of traffic it receives. If a user comes to your site, then clicks through to another page within the KeepAliveTimeout setting (default is 15), a new TCP does not have to be created. This can really help with overhead.

On the other hand, any Apache processes that are currently tied up w/ existing visitors will not be able to talk to the new ones. So you may have to increase the total number of Apache processes that are available.

In short... it requires tweaking.

tambler
thanks for the answering but the keep-alive is not working in my site how can i enable and my site doesn't have a lot amount of traffic thanks
vipinsahu
+1  A: 

You can't control keepalive behaviour in an .htaccess. Keepalives are a host-level feature, not one where different directories can behave differently depending on the per-directory htaccess info.

If you are on the kind of basic shared hosting that only gives you .htaccess to configure your sites, you can't change the keepalive settings. Presumably the hosting company will have set them appropriately, or just left them on the default settings, which are usually fine.

bobince
Thanks bobince ,what should be the timeout time , as my site doesn't have a great amount of trafficthanks
vipinsahu
If your hosts haven't changed it, the default in Apache 2.0 is 15 seconds, and in 2.2 it's 5 seconds. Either setting is perfectly reasonable.
bobince
+1  A: 

you can't control keep-alive behavior in .htaccess

fuzzy lollipop