This guide provides instructions for a server administrator to identify and resolve high CPU usage on a cPanel server using the WHM interface. High CPU usage can impact server performance, slow down website loading times, and cause service instability.
Before you begin
You will need:
Root access to the WHM interface
A current understanding of the server's resource limits
Identify the source of high CPU usage
To resolve high CPU usage, you must first identify which process or account is consuming the most resources.
Log in to WHM.
Navigate to Server Information > Server Information.
Review the CPU Usage section to see the current load.
If the load is high, navigate to Module Configuration > CPU Manager (if available) or use the Process Manager to see active processes.
Identify the specific process name or the associated cPanel account causing the spike.
Investigate the specific account or process
Once you have identified a high-usage process, determine if it is a system process or a specific user's application.
If the process is a system service (e.g.,
mysqld,httpd,exim), check the service status in Server Information > Server Information.If the process is associated with a specific cPanel account, navigate to Account Information > List Accounts.
Search for the account identified in the process list.
Note the account's resource usage and the specific scripts or applications running on that account.
Resolve the high CPU usage
Depending on the cause, perform the appropriate action to mitigate the load.
If the issue is caused by a runaway script or a specific website's activity:
Navigate to Home > Process Manager.
Locate the specific process ID (PID) for the runaway script.
Select the process and click Kill to stop it immediately.
If the issue is caused by a high volume of traffic to a specific site:
Identify the IP addresses or geographic regions causing the spike.
Use a firewall tool (such as ConfigServer Security & Firewall) to block the offending IPs.
If the traffic is legitimate but overwhelming, consider implementing a caching solution or a Content Delivery Network (CDN).
If the issue is caused by a system service requiring a restart:
Navigate to Server Information > Server Information.
Identify the service (e.g., Apache or MySQL).
Select the service and click Restart.
Confirm the result
After taking action, monitor the server's performance to ensure the CPU usage has stabilized.
The Server Information page shows a return to normal CPU usage levels.
The specific process or account identified as the source of the load is no longer consuming excessive resources.
If the CPU remains high after taking action
If the CPU usage remains high after killing a process or restarting a service, the issue may be deeper in the configuration or caused by a persistent loop.
Check the Apache Error Logs and MySQL Error Logs via Home > Report Abuse (or the specific log viewer) to see if a specific script is failing repeatedly.
Check the Exim Mail Queue to see if a massive amount of mail is being processed.
If the issue persists and you cannot identify the cause, contact Hostek support with the specific process names and the timeframes of the spikes.
Limitations
This procedure does not resolve issues caused by insufficient hardware resources; if the server is consistently over-provisioned, a hardware upgrade may be required.
Some system-level processes may require a full server reboot to clear persistent hung states.
