We have a server with large amount of http traffic.(roughly 450 simultaneous requests during peak hour and still pushing).
Server specification:
PIII 1 Ghz
1 GB Ram
40GB IDE
Redhat 7.1
Apache setting:
Timeout 100
KeepAlive On
MaxKeepAliveRequests 0
KeepAliveTimeout 15
MinSpareServers 5
MaxSpareServers 10
StartServers 5
MaxClients 1024 (Current setting 512)
MaxRequestsPerChild 0
I would like to know if the above apache configuration looks fine?
Is the MaxClients too high? Will it cause server lock up?
cperciva
01-22-2002, 09:49 PM
Originally posted by Eiv
MinSpareServers 5
MaxSpareServers 10
StartServers 5
MaxClients 1000
Bad Idea. Standard deviation is proportional to the square root of the mean; if MaxSpareServers-MinSpareServers is less than a couple standard deviations then Apache will be randomly oscillating between spawning new processes and killing active processes. Also, if you know that you're going to need 400+ processes, why start by spawning five?
I'd suggest
MinSpareServers 50
MaxSpareServers 100
StartServers 400
MaxClients 1000
AlaskanWolf
01-22-2002, 11:47 PM
Originally posted by cperciva
Bad Idea. Standard deviation is proportional to the square root of the mean; if MaxSpareServers-MinSpareServers is less than a couple standard deviations then Apache will be randomly oscillating between spawning new processes and killing active processes. Also, if you know that you're going to need 400+ processes, why start by spawning five?
I'd suggest
MinSpareServers 50
MaxSpareServers 100
StartServers 400
MaxClients 1000
How about MaxRequestsPerChild ?
When I restart apache. i get the message below. Does anyone know how to fix up this problem.
[root@]# /etc/rc.d/init.d/httpd start
Starting httpd: WARNING: MaxClients of 512 exceeds compile time limit of 256 servers,
lowering MaxClients to 256. To increase, please see the
HARD_SERVER_LIMIT define in src/include/httpd.h.
[Fri Jan 25 14:42:50 2002]
ReliableServers
01-25-2002, 01:06 AM
Timeout 100
If your pushing just html I would lower that. I have mine set to 5 and dont have any problems.
priyadi
01-25-2002, 01:24 AM
Originally posted by Eiv
When I restart apache. i get the message below. Does anyone know how to fix up this problem.
[root@]# /etc/rc.d/init.d/httpd start
Starting httpd: WARNING: MaxClients of 512 exceeds compile time limit of 256 servers,
lowering MaxClients to 256. To increase, please see the
HARD_SERVER_LIMIT define in src/include/httpd.h.
[Fri Jan 25 14:42:50 2002]
Well, you need to do what it tells you. You need to recompile Apache, but before that you need to edit src/include/httpd.h, and change a line like this: #define HARD_SERVER_LIMIT 1024, or something like that.
cperciva
01-25-2002, 01:30 AM
Originally posted by AlaskanWolf
How about MaxRequestsPerChild ?
Unless you're leaking memory, MaxRequestsPerChild 0 is appropriate.
astanley
01-26-2002, 11:47 AM
You may not need such a high setting for max clients, if you turn off KeepAlives. I know on a high traffic web server we use for a dedicated customer, setting the max clients up over 1000 caused extreme load on the server (a P3-750mhz, SCSI drives), and during peak hours one day even managed to DOS it. Changing the KeepAlives to off and turning down the max clients solved the problem, and we haven't seen any adverse effects from this - less a little bit more network traffic due to the need to re-establish the http sessions.
-Adam
ffeingol
01-26-2002, 01:09 PM
Originally posted by cperciva
Unless you're leaking memory, MaxRequestsPerChild 0 is appropriate.
And if you were leaking memory (or at least the httpd processes keep getting bigger and bigger)?
Frank