Search code examples
multithreadingperformanceapacheworkerapache2.4

Apache 2.4 not creating min spare threads which we have defined


We have a optimized Apache 2.2 setting which works fine, but after upgrading to Apache 2.4 it seems not reflecting. Both Apache were enabled with worker module, have shared the details below.

Apache 2.2 Settings

<IfModule worker.c>
ServerLimit         40
StartServers        40
MaxClients          2000
MinSpareThreads     2000
ThreadsPerChild     50
</IfModule>

Apache 2.2 Server-Status output

35 requests currently being processed, 1965 idle workers

Apache 2.4 Settings

<IfModule worker.c>
ServerLimit           40
StartServers          40
MaxRequestWorkers     2000
MinSpareThreads       2000
ThreadsPerChild       50
</IfModule>

Apache 2.4 Server-Status output

1 requests currently being processed, 99 idle workers

Need someone's help to point out me the missing setting so that I can have my Apache 2.4 to create 2000 threads at the startup of Apache service.

Thanks.


Solution

  • Thanks Daniel for your response.

    I just found the issue few hours back. The conf '00-mpm.conf' (which has the modules to enable prefork / worker / event) was called below the worker.c module setting which seems to have caused the issue. Moving it above the worker setting made apache to pick up the worker setting mentioned.