Portal Home > Knowledgebase > Articles Database > Increase maxclients limit


Increase maxclients limit




Posted by howsthat, 11-30-2007, 02:39 PM
well now my server load is back to normal i.e 1 - 2 but i want to increase the maxclients limit in my httpd.conf.. when i did 312 and restarted it, it says the max is 256.. so how do i increase the limit

Posted by howsthat, 11-30-2007, 03:00 PM
when i added the ServerLimit line in httpd.conf, on restart apache it says Syntax error on line 36 of /usr/local/apache/conf/httpd.conf: Invalid command 'ServerLimit', perhaps mis-spelled or defined by a module not included in the server configuration this is the error i get WARNING: MaxClients of 312 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.

Posted by anatolijd, 11-30-2007, 04:54 PM
Well, this means that apache was built (compiled) with 256 MaxClients limit and there is no other way to increase this value than recompile apache. To check HARD_SERVER_LIMIT value compiled: # ~apache/bin/httpd -V | grep SERVER_LIMIT -D HARD_SERVER_LIMIT=256 Similar discussion: http://www.linuxquestions.org/questi...-issue-310627/ change src/include/httpd.h: #define HARD_SERVER_LIMIT 256 with #define HARD_SERVER_LIMIT 1024 BTW, on our H-Sphere hosting we already have: # ~httpd/bin/httpd -V | grep SERVER_LIMIT -D HARD_SERVER_LIMIT=1024 Good luck,

Posted by howsthat, 11-30-2007, 11:35 PM
i have tried changing it manually but thento its not working.. when i search for httpd.h files, there are in total 5 files on the server.. i have changed all with the new server_limit but still not working.. any solution

Posted by howsthat, 12-01-2007, 01:50 AM
do i need to reconfigure apache.. If yes plz say how to do that.. i had updated my apache using /scripts/easyapache command

Posted by sytker, 12-01-2007, 08:15 AM
As anato said, you need to edit the source code and rebuild apache. Maybe, you should look for an admin to do that. In general,what do you need to do is to optimize your apache server, so you don't need to rebuild. Yet, there is a reason why the default maxclients value is 256, its related to the RAM memory. Use the search at the top of webhostingtalk to find out some articles about optimizing apache. Ok?

Posted by howsthat, 12-01-2007, 08:38 AM
well i updated apache from 1.3.39 to 2 so i can now use the serverlimit line in httpd.conf.. so no prob.. Thx a lot for ur help

Posted by manuel66, 03-09-2010, 06:18 AM
Are you sure you did not start another web server? (es. IIS on Windows) I had the same error ... Then I turned off IIS! Now is OK.

Posted by ksv2nash, 03-09-2010, 10:25 AM
Hello, Just make some following changes in your/usr /local/apache/conf/httpd.conf so you not have anyy issue with your cpu load StartServers 8 MinSpareServers 5 MaxSpareServers 20 ServerLimit 256 MaxClients 256 MaxRequestsPerChild 4000



Was this answer helpful?

Add to Favourites Add to Favourites    Print this Article Print this Article

Also Read
Hostdime or Crocweb? (Views: 632)