Quick note: apache 2.4 - Max Clients is now named MaxRequestWorkers
You can find the apache values in:
/etc/httpd/conf/httpd.conf
OR
/etc/httpd/conf.modules.d/00-mpm.conf
If no value has been set then chances are the default of 256 is set. (Tip: run apache2buddy to find out the value if you are having trouble working it out)
Best command to find the current apache processes is:
pstree | grep httpdAlternative:
ps afx | grep httpd | wc
grep -i maxclients /etc/httpd/conf/httpd.conf
grep -i maxclients /var/log/httpd/error_logHas it happened before? zgrep checks through ALL of the compresses and uncompressed logs, the * at the end of error represents all of the logrotated files:
zgrep -i maxclients /var/log/httpd/error_log*What are the currently configured max connections?
grep -i maxc /etc/httpd/conf/httpd.conf | head -3Ubuntu could have max clients configured in a number of different places, first place to look is:
grep -i maxc /etc/apache2/apache2.conf | head -4or
grep -i maxc /etc/apache2/mods-enabled/mpm_prefork.confCurrent connections:
pstree | grep httpd
grep -i maxclients /var/log/apache2/error_logHas it happened before?
zgrep -i maxclients /var/log/apache2/error_log*Current connections:
pstree | grep apache
ps -H h -ylC httpd | perl -lane '$s+=$F[7];$i++;END{printf"Avg=%.1fMB\n",$s/$i/1024}'
ps -H h -ylC apache2 | perl -lane '$s+=$F[7];$i++;END{printf"Avg=%.1fMB\n",$s/$i/1024}'