User Tools

Site Tools


max_clients

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
max_clients [2015/08/26 14:34] luke7858max_clients [2024/05/23 07:26] (current) – external edit 127.0.0.1
Line 1: Line 1:
 +**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)
 +\\
 === CentOS === === CentOS ===
 +Best command to find the current apache processes is:
 <sxh bash> <sxh bash>
-ps afx | grep httpd | wc+pstree | grep httpd
 </sxh> </sxh>
 +Alternative: 
 <sxh bash> <sxh bash>
-pstree | grep httpd+ps afx | grep httpd | wc
 </sxh> </sxh>
-Output shows how many connections apache currently has 
 \\ \\
 \\ \\
Line 13: Line 26:
 grep -i maxclients /etc/httpd/conf/httpd.conf grep -i maxclients /etc/httpd/conf/httpd.conf
 </sxh> </sxh>
 +\\
 \\ \\
 When did apache hit max clients? When did apache hit max clients?
Line 19: Line 33:
 grep -i maxclients /var/log/httpd/error_log grep -i maxclients /var/log/httpd/error_log
 </sxh> </sxh>
-Has it happened before?+Has 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:
 <sxh bash> <sxh bash>
 zgrep -i maxclients /var/log/httpd/error_log* zgrep -i maxclients /var/log/httpd/error_log*
Line 26: Line 40:
 <sxh bash> <sxh bash>
 grep -i maxc /etc/httpd/conf/httpd.conf | head -3 grep -i maxc /etc/httpd/conf/httpd.conf | head -3
 +</sxh>
 +Ubuntu could have max clients configured in a number of different places, first place to look is:
 +<sxh bash>
 +grep -i maxc /etc/apache2/apache2.conf | head -4
 +</sxh>
 +or
 +<sxh bash>
 +grep -i maxc /etc/apache2/mods-enabled/mpm_prefork.conf
 </sxh> </sxh>
 Current connections: Current connections:
max_clients.1440599682.txt.gz · Last modified: 2024/05/23 07:26 (external edit)

Except where otherwise noted, content on this wiki is licensed under the following license: Public Domain
Public Domain Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki