0

Background: I have six webservers behind an ELB, each webserver running 2 virtual host sites. My httpd.conf file doesnt have the configuration for prefork mpm or worker mpm or event mpm.

I tried: I checked under below path and found the default config for prefork mpm path: usr/share/doc/httpd24-2.4.23/httpd-mpm.conf

# 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 connections a server process serves
#                         before terminating

    <IfModule mpm_prefork_module>
        StartServers            10
        MinSpareServers          8
        MaxSpareServers         10
        MaxRequestWorkers      250
        MaxConnectionsPerChild   0
    </IfModule>

I have created prefork.conf file under /etc/httpd/conf.d and later restart the httpd service, but I got below error saying:

AH00180: WARNING: MaxRequestWorkers of 400 exceeds ServerLimit value of 256 servers, decreasing MaxRequestWorkers to 256. To increase, please see the ServerLimit directive.

Someone please let me know what values I need to set inorder to get prefork mpm working. I have 16GB of RAM in my servers and only 100MB of space is left.I dont think that much of configuration is needed for just two virtual host sites. Let me know how could I optimize the memory usage and get prefork mpm working

1
  • 1
    there is no standard answer. Your app will run differently from others. It might use a lot more memory per process and need to be restarted every Nth request.
    – Mike
    Sep 20, 2017 at 15:14

1 Answer 1

0

Below config worked for me

<IfModule mpm_prefork_module>
    StartServers            10
    MinSpareServers         8
    MaxSpareServers         10
    ServerLimit             400
    MaxClients              400
    MaxConnectionsPerChild  0
</IfModule>

Thankyou

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.