Hello Rachel S,
The RAM is a vital part of the server. Unfortunately, RAM memory is often blocked in the cache; therefore, the server loads slowly and does not respond to the new processes because RAM memory isn't available for the new processes.
However, to resolve the RAM memory cache issue, you can set the Cron Jobs to reset the RAM memory cache after every 30 minutes by following the ways below,
- Firstly, log in to the server as a root user.
- Then, create new file /root/memory.sh in your editor and add the following to the file,
echo 1 > /proc/sys/vm/drop_caches
root@linux [~]# cat /root/memory.sh
echo 1 > /proc/sys/vm/drop_caches
root@linux [~]# cat /root/memory.sh
echo 1 > /proc/sys/vm/drop_caches
- Now, Set the 755 permission to /root/memory.sh file
- Lastly, add the Cron under the server's main crontab file by the following command,
Code:
*/30 * * * * sh /root/memory.sh;
--------------------------------
Regards,
Rex Maughan
Leave a comment: