Performance Issue due to server reached MaxRequestWorkers on Apache httpd
Environment
- Red Hat Enterprise Linux (RHEL)
- Red Hat JBoss Enterprise Application Platform (EAP)
- Red Hat JBoss Web Server (JWS)
- Red Hat JBoss Core Services (JBCS)
- Apache Web Server (httpd)
Issue
-
The Apache httpd hangs after reaching 256 connections. We see below error message in error_log.
AH00161: server reached MaxRequestWorkers setting, consider raising the MaxRequestWorkers setting -
The Apache httpd server is running out of MaxRequestWorkers very quickly. How to increase MaxRequestWorkers?
-
Httpd only allowing 256 connections in
Prefork mpm
Resolution
- Tune up the MPM settings by increasing
MaxRequestWorkersand related directives using our This content is not included.Load Balancer Configuration Tool. - For more information about MPM tuning, refer to Tuning Apache HTTPD MPM Worker and Event
- This message can also happen after upgrading to JBCS httpd 2.4.51+ as noted in httpd exhausted with smaller pool size after upgrading to JBCS httpd 2.4.51
- For understanding what
MaxClients/MaxRequestWorkersis capable to handle, refer to Understanding the MaxClients/MaxRequestWorkers Apache is capable of handling
Root Cause
- The amount of traffic was greater than the request worker limit specified in directive
MaxRequestWorkers, exhausting httpd's thread pool. - The Prefork MPM
ServerLimitdefaults to 256, so if theMaxRequestWorkersis increased beyond that number, Apache httpd will throw a warning message and truncate theMaxRequestWorkersdown to 250.
SBR
Product(s)
Components
Category
Tags
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.