{"id":3519,"date":"2010-02-27T18:38:09","date_gmt":"2010-02-27T23:38:09","guid":{"rendered":"http:\/\/underhost.com\/blog\/?p=3519"},"modified":"2025-03-21T17:01:02","modified_gmt":"2025-03-21T21:01:02","slug":"warning-maxclients-exceeds-serverlimit","status":"publish","type":"post","link":"https:\/\/underhost.com\/blog\/warning-maxclients-exceeds-serverlimit\/","title":{"rendered":"Warning: MaxClients exceeds ServerLimit"},"content":{"rendered":"<h2>How to Increase MaxClients and ServerLimit in Apache<\/h2>\n<p>If your Apache web server stops responding due to reaching the maximum number of allowed client connections, you may need to increase the <code>MaxClients<\/code> and <code>ServerLimit<\/code> variables. These settings control the maximum number of simultaneous connections Apache can handle, and adjusting them can help improve server performance and stability.<\/p>\n<h3>Understanding MaxClients and ServerLimit<\/h3>\n<p>The <code>MaxClients<\/code> directive sets the maximum number of simultaneous connections Apache can handle, while <code>ServerLimit<\/code> defines the upper limit for the <code>MaxClients<\/code> value. If <code>MaxClients<\/code> exceeds <code>ServerLimit<\/code>, Apache will automatically lower <code>MaxClients<\/code> to match <code>ServerLimit<\/code>.<\/p>\n<h3>Steps to Increase MaxClients and ServerLimit<\/h3>\n<ol>\n<li><strong>Locate the Apache Configuration File<\/strong>:<br \/>\n    The configuration file is typically located at:<\/p>\n<pre><code>\/usr\/local\/apache\/conf\/httpd.conf<\/code><\/pre>\n<\/li>\n<li><strong>Edit the Configuration File<\/strong>:<br \/>\n    Open the file in a text editor and locate the <code>MaxClients<\/code> and <code>ServerLimit<\/code> directives. Increase their values to a higher number, such as:<\/p>\n<pre><code>ServerLimit 500\r\nMaxClients 500<\/code><\/pre>\n<p><strong>Note<\/strong>: Ensure that <code>MaxClients<\/code> does not exceed <code>ServerLimit<\/code>.<\/p>\n<\/li>\n<li><strong>Save and Restart Apache<\/strong>:<br \/>\n    Save the changes and restart the Apache service. However, if you\u2019re using Apache 2.x or higher, the changes may not persist after a restart, and the values may reset.<\/p>\n<\/li>\n<\/ol>\n<h3>Common Warning Message<\/h3>\n<p>After restarting Apache, you may encounter the following warning message:<\/p>\n<blockquote>\n<div>\n<div class=\"smallfont\">Code:<\/div>\n<pre class=\"alt2\" dir=\"ltr\">WARNING: MaxClients of 500 exceeds ServerLimit value of 256 servers, lowering MaxClients to 256. To increase, please see the ServerLimit directive.<\/pre>\n<\/p><\/div>\n<\/blockquote>\n<p>This warning indicates that the <code>MaxClients<\/code> value exceeds the <code>ServerLimit<\/code> value, and Apache has automatically adjusted it.<\/p>\n<h3>Making Changes Permanent<\/h3>\n<p>To ensure the changes persist and are not overwritten during a cPanel update, execute the following commands:<\/p>\n<pre><code>\/usr\/local\/cpanel\/bin\/apache_conf_distiller \u2013update \u2013main\r\n\/usr\/local\/cpanel\/bin\/build_apache_conf<\/code><\/pre>\n<p>These commands will update the Apache configuration and rebuild it, making your changes permanent.<\/p>\n<h3>Best Practices<\/h3>\n<ul>\n<li><strong>Monitor Server Resources<\/strong>: Increasing <code>MaxClients<\/code> and <code>ServerLimit<\/code> can consume more server resources (e.g., RAM, CPU). Monitor your server\u2019s performance to ensure it can handle the increased load.<\/li>\n<li><strong>Use a Staging Environment<\/strong>: Test the changes in a staging environment before applying them to your production server.<\/li>\n<li><strong>Optimize Apache Configuration<\/strong>: Consider other Apache optimizations, such as adjusting <code>KeepAlive<\/code> settings or enabling caching, to further improve performance.<\/li>\n<\/ul>\n<h3>Final Thoughts<\/h3>\n<p>Increasing <code>MaxClients<\/code> and <code>ServerLimit<\/code> can help your Apache server handle more simultaneous connections, improving its responsiveness and stability. However, it\u2019s essential to balance these settings with your server\u2019s available resources to avoid overloading the system. By following the steps above, you can make these changes permanent and ensure your server runs smoothly even under heavy traffic.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>How to Increase MaxClients and ServerLimit in Apache If your Apache web server stops responding due to reaching the maximum number of allowed client connections, you may need to increase the MaxClients and ServerLimit variables. These settings control the maximum number of simultaneous connections Apache can handle, and adjusting them can help improve server performance [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":4853,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-3519","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-news"],"_links":{"self":[{"href":"https:\/\/underhost.com\/blog\/wp-json\/wp\/v2\/posts\/3519","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/underhost.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/underhost.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/underhost.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/underhost.com\/blog\/wp-json\/wp\/v2\/comments?post=3519"}],"version-history":[{"count":2,"href":"https:\/\/underhost.com\/blog\/wp-json\/wp\/v2\/posts\/3519\/revisions"}],"predecessor-version":[{"id":5189,"href":"https:\/\/underhost.com\/blog\/wp-json\/wp\/v2\/posts\/3519\/revisions\/5189"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/underhost.com\/blog\/wp-json\/wp\/v2\/media\/4853"}],"wp:attachment":[{"href":"https:\/\/underhost.com\/blog\/wp-json\/wp\/v2\/media?parent=3519"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/underhost.com\/blog\/wp-json\/wp\/v2\/categories?post=3519"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/underhost.com\/blog\/wp-json\/wp\/v2\/tags?post=3519"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}