I'm running Apache Apache/2.4.25 (Amazon) using prefork and I'm trying to adjust ServerLimit and MaxRequestWorkers. I'm using the following settings:

<IfModule prefork.c> ServerLimit 40 MaxRequestWorkers 40 </IfModule>

The problem is that if I add these settings in /etc/http/conf.d/prefork.conf, they are ignored despite the general /etc/httpd/conf/httpd.conf having the following directive set:

IncludeOptional conf.d/*.conf

Other configuration files present in conf.d/ seem to be parsed but not this one. So, the only way I could adjust the limits is by editing /etc/httpd/conf/httpd.conf directly and placing the above. Why are the values not read from a conf.d/*.conf file? Has anyone else ran into this issue? Any help would be appreciated. Thank you.

  • Just yesterday I had the same issue. Eventually it's about the position when it is included. It seemed like I couldn't change the StartServers setting for mpm-worker. Interestingly enough my other settings in the same file were definitely applied...dunno yet but will continue testing on Monday... – Hello Fishy Apr 8 '17 at 5:42

Did you check the permissions of /etc/http/conf.d/prefork.conf. If you created the file as root or another user and the permissions aren't o+r, apache user might not be able to read the file.

This would probably be visible in server logs.

Another problem might be that if the ServerRoot is not set to /etc/http/, the IncludeOptional would not work. You can try setting it to a full path:

IncludeOptional /etc/http/conf.d/*.conf
  • I did check the permissions, they were 644. I even set the owner to apache.apache. The server root is set to /etc/httpd indeed. – Mugurel Apr 10 '17 at 8:35

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.