Portal Home > Knowledgebase > Articles Database > Max Clients


Max Clients




Posted by gaquay, 04-02-2009, 08:03 PM
i have issue with my vps, but i cant fix it. in error log of apache2 it show server reached MaxClients setting, consider raising the MaxClients setting my apache config KeepAliveTimeout 5 MaxKeepAliveRequests 200 StartServers 3 MinSpareServers 3 MaxSpareServers 10 MaxClients 50 MaxRequestsPerChild 2000 StartServers 2 MaxClients 150 MinSpareThreads 25 MaxSpareThreads 75 ThreadsPerChild 25 MaxRequestsPerChild 0 anyone have idea. Thanks

Posted by Jonathan Kinney, 04-02-2009, 08:09 PM
In the prefork section you can change the 50 to something more like 75, and that will directly be addressing the error. But you may also want to change the KeepAliveTimeout to something less, like 1 second, and the MaxKeepAliveRequests to something higher like 2000. You may also want to enable the server-status page with extended status so you can get an idea of what kind of connections are sticking around, it could be related to something else keeping the connections to apache live and open, when it should be closing quickly.

Posted by Deem3n®, 04-03-2009, 05:48 AM
Also, you can setup lightweight HTTP server to serve all static files or setup a reverse proxy to cache static content

Posted by lemeneid, 04-03-2009, 02:20 PM
If you increase your max settings for apache, make sure to up it for MySQL too or you won't feel the difference. But beware of the Max Clients setting. Setting it too high can result in a cascade effect (Apache > MySQL > PHP) of requests which can and prob will kill your server if you set it too high.

Posted by gaquay, 04-03-2009, 08:51 PM
when i try increase max clients values. sometimes ram is full till i restart httpd. my vps : 512MB dedicated ram and 1GB brust ram

Posted by Steven, 04-04-2009, 12:44 AM
Each client needs several megabytes of ram, in a prefork server (which you are probably using). I would suggest replacing apache with a server such as lighttpd if possible to lower your ram usage.

Posted by Srv24x7, 04-04-2009, 02:04 AM
Maxclient setting will only increase when you set the ServerLimit paramater in the httpd.conf file. That too depends on your phyical RAM so you may have to increase the RAM first and then raise the Maxclients.

Posted by DigitalLinx, 04-04-2009, 09:18 AM
1 on that, nginx as a reverse proxy to apache to serve static content sure speeds things up, saves memory and can accept a lot more connection it just needs a bit work. The only downfall is losing .htaccess functionality.

Posted by vapetrov, 04-04-2009, 03:28 PM
Try KeepAlive off MaxRequestsPerChild 20 Second parameter will restart apache childs to prevent huge memory usage.

Posted by krishna0312, 04-20-2009, 06:59 PM
Hello, Keep like this : MaxClients 250 MaxRequestsPerChild 2000 let us know.



Was this answer helpful?

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

Also Read
The Planet Down (Views: 661)

Language: