Author Topic: server reached MaxClients setting, consider raising the MaxClients setting  (Read 10583 times)

0 Members and 1 Guest are viewing this topic.

Offline
*
We are getting this error in the log. We have nowhere maxed resources so I am wanting to adjust the values. I noticed there are no settings for this in the httpd.conf so I was wondering if CWP has these settings stored elsewhere or if I am safe to add them to the httpd.conf.

Thanks.

Offline
*
you need to provide more info about your issue with log details and information about your system like are you certain that you needed to reach that limit, are that legit connection and many many other things.
AntiDDoS Protection (web + mail)
http://centos-webpanel.com/website-ddos-protection-proxy

Join our Development Team and get paid !
http://centos-webpanel.com/develope-modules-for-cwp


Services Monitoring & RBL Monitoring
http://centos-webpanel.com/services-monitor


Do you need Fast and FREE Support included for your CWP linux server?
http://centos-webpanel.com/noc-partner-list
Installation Instructions
http://centos-webpanel.com/installation-instructions
Get Fast Support Here
http://centos-webpanel.com/support-services

Offline
*
Already asking about MaxClients

Where is that file to increase MaxClients ?

Offline
*
What values can we set this file with?
Do I need to make settings elsewhere after changing this file?

/usr/local/apache/conf/extra/httpd-mpm.conf


Offline
***
You just need to change the value in the appropriate section (prefork, worker, event) of:
Code: [Select]
/usr/local/apache/conf/extra/httpd-mpm.confand then restart Apache.

The value depends on available (free memory). Don't set the value too high. I recommend you to following:

1. Check how much free memory you have;
2. Find the most memory expensive http/apache process;
3. Divide free memory by the RAM usage of the most expensive http/apache process;
4. Divide the result by two.

Don't forget other services eat RAM too :)

I recommend you to check the following guide:
https://www.woktron.com/secure/knowledgebase/133/How-to-optimize-Apache-performance.html

Also, you can use:
Code: [Select]
/scripts/apache_mpm_calculatorto get values recommended by CWP.
« Last Edit: May 31, 2023, 09:00:06 PM by cyberspace »

Offline
*****
Another recommendation is to switch to nginx if you want a more performant web server that consumes less resources than a patchy (apache) web server.
;)

Offline
*
Which option should I enter the values in the calculation?

StartServers                    3
MinSpareThreads              63
MaxSpareThreads             127
ThreadsPerChild               382
ThreadLimit                     382
MaxRequestWorkers         3056
ServerLimit                      3066
MaxConnectionsPerChild    4000

You just need to change the value in the appropriate section (prefork, worker, event) of:
Code: [Select]
/usr/local/apache/conf/extra/httpd-mpm.confand then restart Apache.

The value depends on available (free memory). Don't set the value too high. I recommend you to following:

1. Check how much free memory you have;
2. Find the most memory expensive http/apache process;
3. Divide free memory by the RAM usage of the most expensive http/apache process;
4. Divide the result by two.

Don't forget other services eat RAM too :)

I recommend you to check the following guide:
https://www.woktron.com/secure/knowledgebase/133/How-to-optimize-Apache-performance.html

Also, you can use:
Code: [Select]
/scripts/apache_mpm_calculatorto get values recommended by CWP.

Offline
***
Put all settings offered by apache_mpm_calculator into the appropriate section of:
Code: [Select]
/usr/local/apache/conf/extra/httpd-mpm.confPlease don't forget to make backup of the file before you modify it in order to undo the changes if something goes wrong.

Offline
*
Which one should I enter?
prefork?
worker?
event?

Put all settings offered by apache_mpm_calculator into the appropriate section of:
Code: [Select]
/usr/local/apache/conf/extra/httpd-mpm.confPlease don't forget to make backup of the file before you modify it in order to undo the changes if something goes wrong.

Offline
*
I got into this part. I hope my problem will be fixed.
Do I need to edit anywhere other than here?

<IfModule mpm_event_module>
StartServers              3
MinSpareThreads           63
MaxSpareThreads           127
ThreadsPerChild           382
ThreadLimit               382
MaxRequestWorkers         3056
ServerLimit               3066
MaxConnectionsPerChild    4000
</IfModule>




Put all settings offered by apache_mpm_calculator into the appropriate section of:
Code: [Select]
/usr/local/apache/conf/extra/httpd-mpm.confPlease don't forget to make backup of the file before you modify it in order to undo the changes if something goes wrong.

Offline
***
Run:

Code: [Select]
/usr/local/apache/bin/httpd -V| grep MPM
in shell to find which MPM you use (most likely "event").
« Last Edit: June 06, 2023, 01:33:10 PM by cyberspace »