How to clear cached memory on cPanel

Clear cached memory on cpanel server

By default the Linux OS is very efficient memory management process that should be freeing any cached memory on the machine that it is being run on. However when it comes to Cached memory the Linux OS may at times decide that the Cached memory is being used and is needed which can lead to memory related issues.

You can use the following command to flush your cache memory

[email protected] [~]# echo 1 > /proc/sys/vm/drop_caches

In order to remove cached memory on every hour the cron job will run this command and clear any memory cache that has built up.

create file to clear cache memory

vi /root/

and paste the following commands.

sync; echo 3 > /proc/sys/vm/drop_caches

save and add this script in your cron job.

0 * * * * /root/

Thats all.. This script will remove cached memory automatically after every hou

  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

cPHulk Brute Force Protection

WHM/cPanel has a service, protected from Brute Force attack, which is called “cPHulk Brute Force...

Enable SSH key authorized login without root password

You need to generate SSH Key ( the private key )on your cpanel server and then update remote...

How can I Redirect URLs in cPanel

Login your cpanel 1. Click the Redirects button on the front page under the “domains” 2. Enter...

Enable Custom php.ini for Fast CGI

With fast-cgi, custom php.ini needs to be in the cgi-bin folder. 1) Move php.ini to cgi-bin...

ConfigServer Firewall CSF installation

ConfigServer firewall is a popular linux firewall security suite. It is easy to install, flexible...

Powered by WHMCompleteSolution