How can I increase 5000 concurrent request with mpm_prefork on Apache

5,421

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.

Share:
5,421

Related videos on Youtube

harshu9713
Author by

harshu9713

Updated on September 18, 2022

Comments

  • harshu9713
    harshu9713 over 1 year

    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
    
  • harshu9713
    harshu9713 over 6 years
    your answer is appreciable...Will you do one more favor for me..What should I use instead of prefork MPM. Is there any other best choice???
  • HBruijn
    HBruijn over 6 years
    Please see this Q&A