Strange httpd conf error

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.

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

Thanks Socheat, it restarts fine now :slight_smile:

fixing that problem : “service httpd restart” was enough :slight_smile:

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