Apache KeepAlive & Traffic Exchanges

This tip goes out to all the traffic exchange owners out there who are wondering why their massive server can’t handle the load.

Apache has a feature called KeepAlive. Basically this keeps the connection alive for all the requests a computer has. IE: the page, all the images, etc.

This is great, however by default it keeps the connection open for 15 seconds (KeepAliveTimeout). With surfbars being 15 seconds and under, this is essentially keeping all the connections open for each user surfing. The end result is apache using up all it’s connections.

You can increase your max connections, but that will require more memory and all the other jazz. Or you can change the time down. I set mine to 3 seconds, because the surfbar should be loaded within 3 seconds. If it takes longer, it just recreates the connection. The end result is less connections being open all the time, and the server can handle more visitors faster.

To change it, you’ll need to edit your httpd.conf file

(1) Comments :: Server Administration :: Permalink

One Response to “Apache KeepAlive & Traffic Exchanges”

  1. Justin says:

    You know, this might be why my closet server acts up sometimes. I still haven’t figured out why, but perhaps this is part of the reason …