For a few days we were struggling with a problem on one of our web servers. All websites/domains kept crashing at the same time. We therefore went in search of the Plesk problem and then determined the cause. A look at Plesk's error_logs provided clarity: The MaxRequestWorkers variable is set too low (150) and if there is a lot of traffic, the operation is then stopped. Relatively annoying if you run a few websites and then the pages are no longer accessible. We went looking for problems, googled and looked at logs. Then we got the error message:
The problem (the error message)
The Apache web server periodically fails with the following error message in its error log:
server reached MaxRequestWorkers setting, consider raising the MaxRequestWorkers setting
The error logs are visible here:
- CentOS/RHEL-based distributions:
- Debian/Ubuntu-based distributions:
Explanation for the failures: If the MaxRequestWorkers variable is set too low, the server practically overhauls itself and can no longer process queries. Plesk simply set this variable too low. That's pretty stupid and it's also difficult to adjust the variable (as a layman). We hope that Plesk will fix this variable or make it customizable in an update. But we will still show you how to adjust or change them.
Fix: Increase variable or switch to nginx
We could not change the variable (for permission reasons). So we decided to switch from Apache to nginx:
You can increase the value of MaxRequestWorkers, but be sure to increase the ServerLimit as well. Just set it to 16.
Here example settings:
Thread limit 64
Server limit 16
Questions? Just leave a comment. We're happy to try to help with Plesk and server crashes if needed.
Wasn't that your problem?
Troubleshooting Plesk isn't always easy. But start with the server logs. Login to Plesk backend and check error logs. Otherwise simply log in as root via SSH/FTP and go to the var/logs directory. You should be able to see daily error logs there.