0

I've configured Apache web server on my CentOs sever machine. I want to increase 5000 concurrent request with MPM_Prefork. Please suggest best Prefork configuration for that. I've done Prefork configuration on httpd.conf file, but its not working.

My Prefork configuration:

<IfModule mpm_prefork_module>
      StartServers                5
      MinSpareServers             30
      MaxSpareServers             40
      MaxClients                  5000
      ServerLimit                 20
      MaxRequestsPerChild         500 
</IfModule>

      KeepAlive       On 
      MaxKeepAliveRequests  5000  
      KeepAliveTimeout       5
HBruijn
  • 84,206
  • 24
  • 145
  • 224
harshu9713
  • 25
  • 2
  • 6

1 Answers1

1

How can I support 5000 concurrent requests with mpm_prefork on Apache?

You probably don't.

The prefork MPM is a bad choice for a site that has to handle many simultaneous connections. It uses multiple child processes with one thread each. Each process handles one connection at a time.

For 5000 concurrent connections, you'll need to run 5000 httpd processes...
You will need to check how much memory each httpd process consumes for your configuration, but even with a modest 10 MB per process and not running anything else you will run out of your 16 GB of RAM well before you hit 5000 httpd processes.

HBruijn
  • 84,206
  • 24
  • 145
  • 224