Do you know that all RunCloud server paid plans to have a server monitoring tool that checks your server’s load, memory, and hard disk usage every 15 minutes?
You will receive email and Slack/Telegram notifications (if setup) when the server is in bad health. Server bad health notifications are triggered by the following benchmarks:
- Server load is more than 5
- Available memory is near 0MB
- Disk usage is more than 90%
You will keep receiving server health notifications every hour if the issue is not resolved unless you choose to stop the health notification setting.
By default, you will receive a “RunCloud Server High Usage” email from RunCloud on server bad health. The email will show you the current server load average, memory usage, and disk usage.
Do not panic.
Here are a few steps to take when you receive the “RunCloud Server High Usage” email notification
Table Of Contents
Step 1: Identify which benchmark(s) triggered the notification
Is it a server load, memory, or disk? Server load and memory usage are often correlated with each other and caused by server processes. Disk usage alert could be caused by temporary files filling up the server storage, local backup files, or large files migration.
Step 2: Check current server health
RunCloud server monitoring tool collects your server health data every 15 minutes. After receiving an email alert, you are recommended to confirm your server health status by checking them via RunCloud dashboard (Login RunCloud > Server_Name > Server Health).
- If the server has high disk usage, please refer to Step 3a
- If the server has a high load or high memory usage, please refer to Step 4
Step 3: Free up disk space
If the server disk usage is high (more than 90%) then your server is about to run out of free disk space. Free disk space is essential for processes to store permanent and temporary data.
At the RunCloud Server Health page, you get a “Disk Cleanup” button to free up server disk space. It is safe to run, even in the production server. Here are the tasks it runs:
- Empty all web application log files
- Remove all rotated log of web application
- Remove all rotated log under
mysql bin logthat is more than 3 days
You may also want to identify which directories are taking up server disk space. ncdu is a disk usage analyzer with a graphical interface. It helps to find space hogs on the server. It is fast, simple and easy to use. WP Bullet has a great ncdu tutorial for anyone.
Step 4: Reduce server load/memory usage
High server load and/or high memory usage means certain process(es) are taking up the system resources. It could be a busy process or a zombie process.
You can remote login your server by SSH and run ‘top’ command to check the system processes that taking up most CPU or memory.
For a web hosting server, the most common high load and high memory usage processes are the webserver (Apache/Nginx) and the database server (MySQL/MariaDB). You can restart each service via RunCloud dashboard (Login RunCloud > Server_Name > Services).
You probably do not want to do this but sometimes restarting a server will solve issues magically. You can either restart the server from your server hosting provider panel or via Linux command-line:
sudo shutdown -r now
Step 4a: Check log file
You may want to check the web application log file for any abnormal traffic, such as bad bots, DoS, etc. Your web application web server log file is located at
/apache2 if you use Apache server; Replace
WEB_APP with your web application name)
Use “tail” command to view real-time log file updates:
tail -f WEB_APP_access.log
If what you see is a non-stop flood of entries then your web application is either receiving a lot of traffic or under malicious attacks.
You can block bad IP addresses by adding them to the firewall block list (Login RunCloud > Server_Name > Security > Basic Firewall).
Step 5: Upgrade server
It is possible that your server is running fine but your web application becomes popular and exceeded the server capacities.
Congrats! It is a good problem to have and rather easy to solve. You only need to upgrade your server. If you are using a cloud server provider like Digital Ocean, then upgrading Droplet is just a matter of few clicks.
In case your server IP address is modified after the upgrade (or you migrated to another server), you need to update your server’s IP address via RunCloud Server Setting.
Do not need to panic when you receive the “RunCloud Server High Usage” email and notifications. RunCloud server monitoring tool alerts you (with no extra fee) about server health before it gets worse.
Follows the steps in the article and you will get to know the server health overview and quick fixes. Please open a RunCloud 24/7 support ticket whenever you need help.