PDA

View Full Version : Strange httpd conf error


Fr3d
12-31-2006, 07:54 AM
root@thrawn:~# service httpd start
Flushing IPC Semaphores [ OK ]
Starting httpd: WARNING: MaxClients of 512 exceeds ServerLimit value of 256 servers,
lowering MaxClients to 256. To increase, please see the ServerLimit
directive.
[ OK ]
root@thrawn:~# nano /etc/httpd/conf/httpd.conf
root@thrawn:~# cd /etc/httpd
root@thrawn:/etc/httpd# grep -r ServerLimit ./*
./conf/httpd.conf:ServerLimit 1024
./conf/.httpd.conf:ServerLimit 1024
grep: ./run/dbus/system_bus_socket: No such device or address
root@thrawn:/etc/httpd#

Where is the server limit being set to 256 servers? I can't find it anywhere...
I've removed the .httpd.conf file now though.

IWorx-Socheat
12-31-2006, 09:53 AM
This is actually a silly bug in Apache:

http://issues.apache.org/bugzilla/show_bug.cgi?id=17792

Basically, the ServerLimit directive must come BEFORE the MaxClients directive, so switching the two lines should fix it.

Socheat

Fr3d
12-31-2006, 12:26 PM
Thanks Socheat, it restarts fine now :)

daveyw
01-25-2007, 01:52 AM
Thanks Socheat, it restarts fine now :)


fixing that problem : "service httpd restart" was enough :)

pascal
02-04-2007, 10:58 AM
To increase the maxclient You just have to put the Serverlimit before the maxclient in the httpd.conf and it works

for example :

<IfModule prefork.c>
StartServers 20
MinSpareServers 5
MaxSpareServers 20
ServerLimit 1024 <------ moved this line here rather than after the Maxclients
MaxClients 512 <----------- changed 256 to 512
MaxRequestsPerChild 10000
</IfModule>


Rather than

<IfModule prefork.c>
StartServers 20
MinSpareServers 5
MaxSpareServers 20
MaxClients 256
ServerLimit 1024
MaxRequestsPerChild 10000
</IfModule>


Pascal