Showing posts from April, 2017

How to move MySQL data directory var-lib on CloudLinux + CPanel Apache Server to Home Directory

Here are the steps to move mysql data directory to home directory

Code: ln -s /home/var_mysql/mysql /var/lib/mysql Additionally, please always create a full mysqldump before ever doing something like this as well as stopping Service Manager > MySQL monitor option, since that will restart MySQL after you've stopped it and while you are moving it. The better steps are these:

1. Make a full mysqldump file:

Code: mysqldump --all-databases | gzip > /home/alldatabases.sql.gz 2. Uncheck monitor in WHM > Service Manager for Mysql and save the area

3. Stop MySQL

Code: /etc/init.d/mysql stop 4. Make the directory for MySQL in /home, move it and symlink it:

Code: mkdir /home/var_mysql mv /var/lib/mysql /home/var_mysql chown -R mysql:mysql /home/var_mysql/mysql ln -s /home/var_mysql/mysql /var/lib/mysql /etc/init.d/mysql start 5. Re-check monitor in WHM > Service Manager for MySQL and save the area

If anything goes wrong, you have the full mysqldump backup, and can use these steps to restor…

Cloud Linux EasyApache 4 Swap used 100% CPU Load become 300+


We had one of our servers with a severe issue and this was something described as:

What happens is that apache uses swap instead of using free memory with is near to 100 GB on the server. SWAP is currently near to 2% which will become 100%. After it would become 100%, server’s load begins to raise as well.
Processes get stuck in the queue and server goes to unresponsive state. 
Go to Apache Configuration and reset idle processes to be a lower value which was set to be a higher one and NO SWAP would be there now.

Following settings to improve its performance: ·you have ServerLimit=1500 - I suggest you to reduce it, for example, to 800; ·next parameter - KeepAlive=On - you need to analyze the following things: - your website content: if you have a sites with lots of images and javascripts it is usually better leave KeepAlive turned On and make some additional tweaks. Please note, KeepAlive' enabling reduces CPU usage and increases memory usage on the server.
- the type of tr…