Apache web server goes down periodically with the following error message in its error log:
on CentOS/RHEL-based distributions:
on Debian/Ubuntu-based distributions:
server reached MaxRequestWorkers setting, consider raising the MaxRequestWorkers setting
MaxRequestWorkers limit has been reached and there are no free workers to serve new requests to Apache. As a result, requests are being served slowly or not served at all.
MaxRequestWorkers settings for Apache. General formula looks like below:
# MaxRequestWorkers = (Total RAM – Memory used for Linux, DB, etc.) / process size
MPM Event: The default ServerLimit value is 16. To increase it, you must also raise
MaxRequestWorkersusing the following formula: ServerLimit value x 25 =
MaxRequestWorkersvalue. For example, if
ServerLimitis set to 20, then
MaxRequestWorkerswill be 20 x 25 = 500.
MPM Prefork: The default
MaxRequestWorkersvalue is 256. To increase it, you must also raise
Note: The below values are examples. They must be adjusted according to the server capabilities and load.