Apache can't create more than 400 workers

2.4k views Asked by At

I have a webserver that should handle about 800 simultaneous connections. For this I have configured Apache 2.4 in worker mode (on Centos 6) with this values:

ServerLimit 40 StartServers 25 MaxClients 1000 MinSpareThreads 25 MaxSpareThreads 75 MaxRequestWorkers 1000 ThreadsPerChild 25 MaxConnectionsPerChild 0

However, when I check the server-status I can not see more than 400 workers simultaneously. In error_log file I can see this: "[mpm_worker:error] [pid 2559:tid 140190319810368] AH00286: server reached MaxRequestWorkers setting, consider raising the MaxRequestWorkers setting", but increasing this value has no effect. (with stop/start apache after each change in configuration file). I checked the ulimits and for apache user the value of nproc is 2048. I mention that Apache was compiled by me and I didn't set explicitly any limit at compilation time.

What could be the cause of this limitation?

1

There are 1 answers

1
Cristi Ionut On BEST ANSWER

So I figured out what was causing the issue. In httpd.conf the settings for worker module were declared before loading the module, so they were ignored by apache. Moving them after "LoadModule" section fixed the problem.