I'm testing my server to know how many concurrent connections it support. I configure my mpm_prefork.conf this way:

# prefork MPM
# StartServers: number of server processes to start
# MinSpareServers: minimum number of server processes which are kept spare
# MaxSpareServers: maximum number of server processes which are kept spare
# MaxRequestWorkers: maximum number of server processes allowed to start
# MaxConnectionsPerChild: maximum number of requests a server process serves

<IfModule mpm_prefork_module>
    StartServers             5
    MinSpareServers       5
    MaxSpareServers      10
    MaxRequestWorkers     100000
    MaxConnectionsPerChild   0

# vim: syntax=apache ts=4 sw=4 sts=4 sr noet

But when my server receives ~8200 concurrent connections, an error is fired and apache not respond anymore:

[notice] caught SIGTERM, shutting down

The server have enough memory and left over

The configurations is ok? I have to change anything?


1 Answer 1


You have to also change the ServerLimit value. From the MaxRequestWorkers documentation:

For non-threaded servers (i.e., prefork), MaxRequestWorkers translates into the maximum number of child processes that will be launched to serve requests. The default value is 256; to increase it, you must also raise ServerLimit.

But there is a note in the ServerLimit documentation:

There is a hard limit of ServerLimit 20000 compiled into the server (for the prefork MPM 200000). This is intended to avoid nasty effects caused by typos. To increase it even further past this limit, you will need to modify the value of MAX_SERVER_LIMIT in the mpm source file and rebuild the server.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .