Apache2 optimizing files clarification
I have read that since Apache 2.4 these modules ship in their own file.
MinSpareServers 20
MaxSpareServers 40
MaxClients 200
MaxRequestsPerChild 4500
I needed to adjust my MaxRequestWorkers to a lower value which I could only find on the pre-forkmodule file. When I added MaxRequestWorkers to my apache2.conf file, it wasn't read. Yet when I adjusted it in the mpmprefork file it was read and working as expected.
This is my /etc/apache2/mods-enabled/mpm_prefork.conf file, and you can see that it looks nothing like the above file.
MinSpareServers 5
MaxSpareServers 10
MaxRequestWorkers 112
MaxConnectionsPerChild 0
My questions are:
When I am trying to optimize Apache2, do I have to make these changes to both files?
Does 1 file over-ride the other?
Should both files be the same?
Any clarification with this would be greatly appreciated.
Daronna
2 Replies
Thank you for your response. I am using ApacheBuddy and that's how I knew to adjust MaxRequestWorkers. But when I looked for MaxRequestWorkers in /etc/apache2/apache2.conf file it wasn't there, so I added it to the bottom of
When I changed this number in /etc/apache2/mods-enabled/mpm_prefork.conf, restarted Apache2 and reran ApacheBuddy, it recognized my changes. I removed it from /etc/apache2/apache2.conf, restarted Apache2 and reran ApacheBuddy and still recognized MaxRequestWorkers.
This is why I am questioning which file takes precedence. ApacheBuddy did not recognize the change to apache2.conf …. but it did recognize the change in mpmprefork.conf, and my apache2.conf file is different than my mpmprefork.conf. I have entries in both files i.e. StartServers, MinSpareServers, MaxSpareServers with different numbers as you can see above.
Thank you
Daronna