How to Troubleshoot cPanel WHM Server Load Issues with LearnDash

Managing a cPanel WHM server can sometimes feel like balancing on a tightrope, especially when unexpected server load issues arise. If you’re running a WordPress site with LearnDash, you’ve likely encountered performance issues that can impact your site’s user experience. In this blog post, we’ll walk you through how we diagnosed and resolved a server load issue, and share some best practices for troubleshooting similar problems on your own.
The Issue: High Server Load with LearnDash

Recently, our server started experiencing unusually high load, significantly impacting the performance of our LearnDash-powered site. Despite our initial troubleshooting steps, including updating software and checking error logs, the issue persisted. Here’s how we approached the problem:

1. Ensure Everything is Up-to-Date:
The first step was to ensure that all software, including WordPress, plugins, and server packages, were up-to-date. This step eliminates the possibility of known bugs causing the issue.
2. Check Error Logs:
We combed through the error logs for any clues. Surprisingly, there were no significant errors that pointed to the root cause of the issue.
3. Monitor IP Activity:
Using the command netstat -ntu | awk ‘{print $5}’ | cut -d: -f1 | sort | uniq -c | sort -n, we monitored IP activity to identify any unusual or suspicious traffic that might be overloading the server.
4. Block Suspicious IPs:
We used the CSF firewall command csf -d IP to block IP addresses that were generating high traffic. Although this temporarily reduced the load, the problem persisted.
4. Consider the Bigger Picture:
At this point, we considered that the issue might not be isolated to our LearnDash site. We suspected a potential virus on one of the other websites hosted on the server.
5. Run a Full Virus Scan:
We installed ConfigServer eXploit Scanner (cxs) on our WHM server and ran a comprehensive virus scan. This scan revealed numerous compromised files on another website hosted on the same server.
The Resolution: Cleaning Up Compromised Files
The virus scan confirmed our suspicions—another website on the server had been compromised, leading to the increased server load. After cleaning up the compromised files, the server load returned to normal, and our LearnDash site’s performance improved significantly.
Moral of the Story
Sometimes the issue isn’t where you expect it to be. It’s essential to take a step back and look at the bigger picture. In our case, the problem wasn’t with our LearnDash site itself, but with another site on the same server.

FAQ’s

1. What are the common causes of high server load in cPanel WHM?
High server load can be caused by several factors, including resource-intensive scripts, high traffic, DDoS attacks, or compromised files on the server.
2. How can I monitor server load in cPanel WHM?
You can monitor server load through the WHM dashboard under the “Server Status” section. Additionally, commands like top or htop can provide real-time monitoring via SSH.
3. What should I do if I find suspicious IP activity on my server?
If you find suspicious IP activity, use a firewall like CSF to block the IP addresses. Continuously monitor the server to ensure the load decreases after blocking the IPs.
4. How do I scan for viruses on my cPanel WHM server?

You can use security tools like ConfigServer eXploit Scanner (cxs) or ClamAV to scan for viruses and compromised files on your server.

5. Why is it important to look at the bigger picture when troubleshooting server issues?
Server issues can often be interconnected. If your initial troubleshooting doesn’t resolve the problem, consider that the issue might lie outside the immediate area you’re focusing on, such as another website on the server or even an external attack.