View Single Post
Old 06-25-2003, 07:53 AM  
Smegma
Confirmed User
 
Join Date: Feb 2002
Posts: 1,751
Quote:
Originally posted by funkmaster


yes ... do the following:

cd into new Apache directory
edit ./src/include/httpd.h
change #define HARD_SERVER_LIMIT 256
to #define HARD_SERVER_LIMIT 1024

run:

make clean
./configure
make
make install

edit your http.conf and do the following changes:

Timeout 30
KeepAlive On
MaxKeepAliveRequests 100
KeepAliveTimeout 15
MinSpareServers 10
MaxSpareServers 20
StartServers 50
MaxClients 1000
MaxRequestsPerChild 0

... then restart the apache webserver :

/usr/local/apache/bin/apachectl stop
/usr/local/apache/bin/apachectl start

note: apachectl can be in another location, you can find it by:

locate apachectl

... hope this helps ?
don't mean to shit on this.. apache tuning is more an art than science and to some degree, subjective.

First off, increasing the hard server limit beyond the amount of RAM in the server is not a great idea. This WILL cause apache to crash depending on the size of each apache process and the number of concurrent connections he has. I recommend 512.

MaxClients 1000 - Why set this at 1000 when you just recompiled for 1024? This should be set at 512 as well.

Turn KeepAlives off. Each KeepAlive will be a slot that can be could have been used by an active surfer. But with it turned on, your server is sitting waiting for the last user to let apache know its done.

Increase MinServers to 50 and Max to 100. What this does is keep a buffer of 50 to 100 idle apache processes. This prevents users from having to wait for content.

Check performance. See if you need more RAM. Also check dmesg and make sure you are not running out of network buffers. You will see errors when you type "dmesg" in the console.

Not having enough memory assigned to the network buffers will cause issues. The buffers keep a state table of active network connections (exasorbated by keepalives). If the network buffer does not have enough memory, well then, it can't retain the network state of active connections and they drop (fail)

ICQ me at the ICQ below and I will tune it for you.
__________________
<a href="http://www.jupiterhosting.com"><img src="http://www.jupiterhosting.com/banners/55x55.jupiter.gif" alt="" border="0" align=""></a>

Last edited by Smegma; 06-25-2003 at 07:55 AM..
Smegma is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote