Knowledgebase

Cpanel Out of memory server

Posted by mcomatt, 04-25-2017, 06:00 AM
One of our servers is reaching the Out of memory limit weekly, using Cpanel + mySQL 5.6 with php version 5.6 and Apache 2.2. The server has been increased memory from 8GB to 16GB and now 24GB. What linux tools would people here use to track down which websites are the culprit in case we have some leaky code ? (Have looked at process manager and the command line alternative 'ps' and 'atop') Is there a reliable way to cap the mySQL memory usage, what seems to happen is an accumulation of memory get allocated to MySQL despite traffic subsidence the memory to MySQL just keeps rising perpetually. We are poised to consider - migrate MySQL migration to dedicated database cluster. Thanks if you have constructive help we can explore (especially any DBA's out there ?)

Posted by mcomatt, 04-25-2017, 06:20 AM
Checking the httpd services with : ps -aux | grep httpd | wc -l Am seeing an 25 - 30 instances running concurrently, this number seems very high. Has anyone used PHP-FPM or found Apache 2.4 less hungry for memory resources ?

Posted by victor_y, 04-25-2017, 06:27 AM
To check which user consumes resources the most, you can also take a look at the Daily Process Logs in the WHM. It will show you how much CPU, how much RAM and how many MySQL Processes your users are using. If you are running CloudLinux, you can also take a look at the LVE manager.

Posted by mcomatt, 04-25-2017, 06:33 AM
Thanks victor_y thats a helpful place to start looking for sure.

Posted by HostBastic, 04-25-2017, 07:01 AM
Before migrating the database find the source of the problem, might be an abusive customer. Are you using CloudLinux? The WHM log should help you determin which account is causing this.

Posted by jeromehaynes, 04-25-2017, 07:14 AM
+1 for using cloudlinux as it will stop this from happening automatically as you can place individual constraints per site.

Posted by mcomatt, 04-25-2017, 08:32 AM
Hi @hostBasic Thanks for your reply I appreciate it. I did install cloud Linux before and I remember it not going well in terms of the migration. Can you advise an wise steps to prep to installing Cloud Linux ? Am I right in thinking its £10 a month or something like this per server ?

Posted by HostBastic, 04-25-2017, 08:39 AM
Yes the CloudLinux license comes with a monthly subscription. I asume you are trying to convert a CentOS cPanel server to a CloudLinux cPanel server, there is a syntax for that on the CloudLinux website under the Getting started section

Posted by mcomatt, 04-25-2017, 10:05 AM
Hello @hostBasic Yes Its Centos required to convert, its less the command I need more the covering of the what if scenarios of what can go wrong. Any experience here ?

Posted by jeromehaynes, 04-25-2017, 11:47 AM
I've never had one go wrong, as it usually runs some sort of check before it does anything. Just like cpanel does when that first installs on a CentOS system. Cloudlinux itself doesn't touch any of your site files, and there is a uninstaller that would remove anything it did as a rollback.

Posted by mcomatt, 04-26-2017, 11:54 AM
Thanks @hostBasic and @jerome. I have a scaling question as our server appears to be struggling even with memory expansion at maximum. Its hosts around 200 sites. Would like to have a cpanel MYSL profile so that we can have mySQL hosted on a cluster. This seems to be where most the re resource issues are. Do you know if this effects roundcoube and exim or are they postgres with backend of the email. It would be favourable if we can get email external too maybe postmaster ? What are you using as your scalable layout with cpanel servers ?

Posted by mcomatt, 04-27-2017, 11:09 AM
What is the maximum threshold cpanel servers hold reliably with Exim, mySQL and PHP sites all contained in the same VPS ? We are seeing them host up to 200 site per vps comfortably before performance is noticeably lower is that what others are experiencing ?

Posted by BeZazz, 04-27-2017, 11:53 AM
Sounds like you need to optimize MySQL. There are scripts like https://github.com/major/MySQLTuner-perl which will help.



Was this answer helpful?

Add to Favourites Add to Favourites

Print this Article Print this Article

Also Read
Is atlantic.net down? (Views: 617)
host-frog down (Views: 675)


Language:

Client Login

Email

Password

Remember Me

Search