Forum Moderators: phranque

Message Too Old, No Replies

MaxClient Value

         

Muetze1606

5:50 pm on Apr 1, 2009 (gmt 0)

10+ Year Member



Hi,

I have a little problem with my apache server. It worked for about two years without any problems. And then, a month ago, it freezed completly with the error message:

[error] server reached MaxClients setting, consider raising the MaxClients setting

So I increased the MaxClient value from 150 to 256 (what is as I understood the maximum value for this setting on a standard apache). After that the server worked well until yesterday. Again freezed with the same error message.

But I don't really understand, because the user count on the server is approximately the same all the time, maybe it has been increased a bit, but really not more than 50% in the last month (as it has to be to freeze also with the new value 256).

Any hints or explanations, why this could be happen? Is there maybe another problem on the server next to this MaxClient setting?

Thanks for your answers.

Bye
Matthias

debajit kataki

5:11 am on Apr 2, 2009 (gmt 0)

10+ Year Member



Hello Matthias,

First thing apache MaxClients settings can be further increased if needed be, depending on your resource availability.

Find our your apache per process Memory consumption as below:

avg RSS= ps -ylC httpd --sort:rss ¦ awk '{ sum = sum + $8 } END { print sum/NR }'

Maxclients= (Total RAM * MEM percent dedicated for apache web server) / average RSS usage.

and accordingly edit the httpd-mpm.conf or respective mpm file/settings to change the parameter.

and remember to explicitly stop and then start apache(don't forget to see the error file)

Secondly,

If you suspect these are not real traffic, check with netstat command if you have TIME_WAIT etc. a lot for a long time (netstat -punta ¦grep TIME_WAIT)

also configure apache mod_status to analyze the traffic,
[httpd.apache.org...]

After these few steps, if you feel all safe, please go ahead and increse maxcliets,

.....as Dude your site is getting more traffic! :-)

~Best Regards
Debajit Kataki