New in CWP Edge / LTSFree with every CWPpro licenceWebsites up to 300x faster

CWP now includes LSPHP, LSAPI-Cache and CWP Cage at no extra cost with all CWPpro licences. The LSAPI-Cache plugin is integrated into our WordPress and other script installers. Available now in the Edge-Latest and LTS-Stable versions. Discuss in the forum

LSPHP / Cache ›
CWP Secure KernelKernel-level protectionEvery site in its own sandbox

Every PHP site, cron job and SSH session runs in its own profile that the kernel enforces. A hacked WordPress cannot read other accounts’ files, and crypto miners and unexpected processes are stopped. Discuss in the forum

Secure Kernel ›
CWP DataCenter PanelFree for CWPpro serversAll your servers on one screen

Manage all your CWP servers from one panel: live health, every hosting account, CWP and OS updates on many servers at once, backups, SSL, firewall and Telegram alerts. Discuss in the forum

DataCenter Panel ›
CWP Backup ServerFree for CWPpro serversBackups that ransomware cannot reach

Protected backups of all your CWP servers on a separate machine. Snapshots a hosting server cannot delete, and restore of files, databases, mail and whole accounts in the admin and user panel. Discuss in the forum

Backup Server ›
WordPress ManagerIncluded & freeWordPress managed from the panel

Install, secure, update, back up and clone WordPress sites without FTP. Updates are tested on a staging clone first and applied to the live site only when they pass, with a backup taken first. Discuss in the forum

WordPress Manager ›
CWP CageIsolationEvery account in its own cage

Per-account isolation built from Linux namespaces and cgroups. A break-in or a runaway script on one site cannot reach another account, the panel or the rest of the server; resource limits per hosting package. Discuss in the forum

CWP Cage ›
Script InstallerOne-click appsWordPress, Joomla, Moodle and more in one click

CWP’s own script installer in the user panel: pick an app, choose the domain and folder, and it is live in seconds with its database and admin login created automatically. Ready for LSPHP and LSAPI-Cache. Discuss in the forum

Script Installer ›
DNS ClusterFor every control panelOne DNS cluster for all your servers

Your servers keep creating domains as usual; the zones are collected into one authoritative PowerDNS cluster you control, with DNSSEC, roles and a full activity trail. Accepts CWP, cPanel, Plesk, DirectAdmin and BIND. Discuss in the forum

DNS Cluster ›
CWP BillingFree to useBilling and support system for hosting providers

Clients, services, invoices, payments, domains, server provisioning and support tickets in one place. All gateways, server modules and registrars are free, with free migration from WHMCS, ClientExec and Blesta. Discuss in the forum

CWP Billing ›
CWPproFrom $1.49 per monthEvery CWP feature unlocked

CWPpro is the professional version of Control Web Panel: all features, unlimited accounts, the latest CWP version and security fixes first. $1.49 per month or $11.99 per year. Discuss in the forum

Get CWPpro ›

server reached MaxClients setting, consider raising the MaxClients setting

Started by meatatarian, July 09, 2015, 12:16:40 AM

Previous topic - Next topic

meatatarian

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.

Administrator

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.

sujoydhar

Already asking about MaxClients

Where is that file to increase MaxClients ?

utkuweb

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


cyberspace

You just need to change the value in the appropriate section (prefork, worker, event) of:
/usr/local/apache/conf/extra/httpd-mpm.conf
and 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:
/scripts/apache_mpm_calculator
to get values recommended by CWP.

overseer

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.
;)

utkuweb

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

Quote from: cyberspace on May 31, 2023, 08:56:56 PM
You just need to change the value in the appropriate section (prefork, worker, event) of:
/usr/local/apache/conf/extra/httpd-mpm.conf
and 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:
/scripts/apache_mpm_calculator
to get values recommended by CWP.

cyberspace

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

utkuweb

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

Quote from: cyberspace on June 03, 2023, 01:49:24 AM
Put all settings offered by apache_mpm_calculator into the appropriate section of:
/usr/local/apache/conf/extra/httpd-mpm.conf
Please don't forget to make backup of the file before you modify it in order to undo the changes if something goes wrong.

utkuweb

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>




Quote from: cyberspace on June 03, 2023, 01:49:24 AM
Put all settings offered by apache_mpm_calculator into the appropriate section of:
/usr/local/apache/conf/extra/httpd-mpm.conf
Please don't forget to make backup of the file before you modify it in order to undo the changes if something goes wrong.

cyberspace

Run:

/usr/local/apache/bin/httpd -V| grep MPM

in shell to find which MPM you use (most likely "event").