Daily Tech News, Interviews, Reviews and Updates

What to do in case of Apache error server reached MaxRequestWorkers setting?

If you see a message in your Apache error log which is like, ‘server reached MaxRequestWorkers setting’, it does not indicate that there is anything incorrect with Apache or your Apache MaxRequestWorkers setting. You should not be making any changes to Apache.

However, it means that one of your apps has been having slow PHP scripts or is receiving such a large number of requests that your PHP scripts are unable to answer requests as quickly as they are coming in.

The reason behind this error to happen?

For each app, PHP can simultaneously perform a limited number of requests. If a PHP script performs very slowly, a small amount of traffic can even be causing this limit to be reached.

When this limit is reached and all of an app’s PHP processes are busy executing requests, every additional request that comes into your server is queued by Apache until PHP completes an existing request and is available for another, ServerPilot reports.

While the number of queued requests waiting for PHP becomes too large, you see this ‘server reached MaxRequestWorkers’ setting” error message.

Identifying a Slow PHP Script

In this case, you should look at your app’s PHP slow log located at: /srv/users/serverpilot/log/APPNAME/APPNAME_phpX.Y.slow.log

where phpX.Y is the version of PHP your app is using, for example, php5.6.

Identifying a Large Amount of Traffic to a PHP Script

If you do not see any slow requests, then you should check your app’s PHP access log at:

/srv/users/serverpilot/log/APPNAME/APPNAME_phpX.Y.access.log

to see if you are receiving a large number of requests that you do not expect.

 



Readers like you help support The Tech Outlook. When you make a purchase using links on our site, we may earn an affiliate commission. We cannot guarantee the Product information shown is 100% accurate and we advise you to check the product listing on the original manufacturer website. Thetechoutlook is not responsible for price changes carried out by retailers. The discounted price or deal mentioned in this item was available at the time of writing and may be subject to time restrictions and/or limited unit availability. Amazon and the Amazon logo are trademarks of Amazon.com, Inc. or its affiliates Read More
You might also like

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Accept Read More