How to Fix DirectAdmin High Server Load Caused by Too Many Apache Processes

Priya

Content Writer & Researcher

Last Updated: 16 October 2026
How to Fix DirectAdmin High Server Load Caused by Too Many Apache Processes
πŸ–₯️

DirectAdmin Server Overloaded? Our Engineers Will Fix It

High server load means slow sites, dropped connections, and angry clients. CloudHouse's DirectAdmin specialists tune Apache, PHP-FPM, and Nginx for your exact workload β€” and keep it that way. Get help today.

πŸ–₯️12,400+PCs Fixed
⭐4.9β˜…Google Rating
⚑<15 minAvg. Response
πŸ›‘οΈISO 27001Certified

If your DirectAdmin server's load average is consistently above the number of CPU cores, the first thing to check is Apache. Too many Apache processes running simultaneously saturate RAM, push the server into swap, and bring everything to a crawl β€” including the DirectAdmin control panel itself. The error message in your Apache logs (AH00484: server reached MaxRequestWorkers setting) is the clearest signal that your Apache configuration needs tuning. This guide shows you how to diagnose the exact cause, calculate the right limits, persist changes through CustomBuild updates, and switch to a higher-performance MPM if needed.

πŸ’‘ None of these worked? Skip the guesswork.

Get Expert Help β†’

Step 1: Diagnose the Root Cause

1Check current server load and memory
uptime
# Load average output: 1.23 5.67 8.90 (1-min, 5-min, 15-min)
# If 1-min load exceeds CPU core count, Apache is the likely culprit

free -m
# Check: how much RAM is used, how much swap is active

top -bn1 | grep httpd | wc -l
# Count: current number of Apache (httpd) processes running
2Check Apache error logs for MaxRequestWorkers messages
grep -i "maxrequestworkers\|maxclients\|reached" /var/log/httpd/error_log | tail -20

If you see AH00484: server reached MaxRequestWorkers setting, consider raising the MaxRequestWorkers setting, Apache hit its process limit and started rejecting requests. Ironically, raising this limit without enough RAM makes things worse β€” so read the next section before changing any numbers.

3Find which sites are generating the most load
# Enable mod_status if not already active, then check:
curl http://localhost/server-status?auto 2>/dev/null | grep -E "^(Busy|Idle|Total)"

# Check which domains are getting the most hits right now:
tail -1000 /var/log/httpd/access_log | awk '{print $1}' | sort | uniq -c | sort -rn | head -20

# Check for xmlrpc.php attacks (WordPress-specific CPU drain):
grep "xmlrpc.php" /var/log/httpd/access_log | wc -l
1Get the average Apache process size
ps -ylC httpd --sort:rss | awk '{sum+=$8; count++} END {print "Avg RSS:", sum/count/1024, "MB"}'

On a typical PHP hosting server with no OPcache pre-load, each Apache process consumes 25–60 MB. Use the actual number from this command.

2Calculate your safe limit

Example: 8 GB RAM server, 1.5 GB reserved for MariaDB, PHP-FPM, and the OS, average Apache process size 45 MB:

(8192 MB - 1536 MB) / 45 MB β‰ˆ 149

# Round down to a safe value:
MaxRequestWorkers 120

Always leave a 20% buffer below the calculated maximum. The goal is to cap Apache before it forces the kernel to start swapping.

1Identify the current MPM and config file
apachectl -V | grep "MPM"
# Output: Server MPM: prefork (or worker, or event)

# Check where MPM settings live:
grep -r "MaxRequestWorkers\|MaxClients" /etc/httpd/conf/ 2>/dev/null
grep -r "MaxRequestWorkers\|MaxClients" /usr/local/directadmin/custombuild/custom/ 2>/dev/null
2Create the CustomBuild custom config directory
mkdir -p /usr/local/directadmin/custombuild/custom/ap2/
3Copy the default MPM config to the custom path
cp /etc/httpd/conf/extra/httpd-mpm.conf    /usr/local/directadmin/custombuild/custom/ap2/httpd-mpm.conf
4Edit the custom copy

Open /usr/local/directadmin/custombuild/custom/ap2/httpd-mpm.conf and find the <IfModule mpm_prefork_module> block (or worker/event, depending on your MPM):

<IfModule mpm_prefork_module>
    StartServers             5
    MinSpareServers          5
    MaxSpareServers         10
    MaxRequestWorkers      120
    MaxConnectionsPerChild   0
</IfModule>

Set MaxRequestWorkers to your calculated value. Setting MaxConnectionsPerChild to a non-zero value (e.g., 1000) causes Apache to recycle processes after handling that many requests, which prevents slow memory leaks over time.

5Apply and verify
/scripts/restartsrv_httpd
apachectl -t   # Verify configuration syntax
top -bn1 | grep httpd | wc -l   # Watch process count drop
1Enable PHP-FPM in CustomBuild
cd /usr/local/directadmin/custombuild
./build set php1_mode php-fpm
./build php n
2Switch individual domains in DirectAdmin

DirectAdmin admin panel β†’ Reseller Level β†’ Manage User Packages β†’ select the user β†’ PHP Version Selector β†’ choose PHP-FPM mode. Alternatively, set it for all accounts at once via the PHP Version Selector in Admin Level.

3Verify PHP-FPM is running
systemctl status php-fpm
ps aux | grep php-fpm | head -5
# Apache processes should now be much smaller:
ps -ylC httpd --sort:rss | awk '{sum+=$8; count++} END {print "Avg RSS:", sum/count/1024, "MB"}'

Step 5: Add Nginx as a Reverse Proxy (Optional, High Traffic)

For servers handling sustained high traffic, placing Nginx in front of Apache dramatically reduces load. Nginx handles static files and concurrent connections efficiently, passing only dynamic PHP requests to Apache. DirectAdmin's CustomBuild supports this directly:

cd /usr/local/directadmin/custombuild
./build set webserver nginx_apache
./build nginx
./build apache n
./build rewrite_confs

After this, Nginx listens on port 80/443 and Apache listens on port 8080. All static files (images, CSS, JS) are served by Nginx without touching Apache, and Apache's MaxRequestWorkers limit is hit far less frequently.

Step 6: Block Resource-Draining Attacks at the Apache Level

Many DirectAdmin servers with high load are actually under low-level attacks rather than legitimate traffic spikes. The most common are WordPress xmlrpc.php floods and slow-loris HTTP attacks.

Block xmlrpc.php attacks

# Add to /etc/httpd/conf/extra/httpd-vhosts.conf or per-domain .htaccess:
<Files xmlrpc.php>
    Order Deny,Allow
    Deny from all
</Files>

Enable mod_reqtimeout to mitigate slow-loris

# Verify mod_reqtimeout is loaded:
apache2ctl -M | grep reqtimeout

# Add to httpd.conf or a custom include:
RequestReadTimeout header=20-40,MinRate=500 body=20,MinRate=500

Rate-limit by IP using mod_evasive

cd /usr/local/directadmin/custombuild
./build set mod_evasive yes
./build mod_evasive

Step 7: Monitor Load After Changes

# Watch load average in real time:
watch -n5 "uptime && free -m && ps aux | grep httpd | wc -l"

# Set a cron alert if load exceeds threshold:
echo "*/5 * * * * root [ \$(cut -d' ' -f1 /proc/loadavg | cut -d. -f1) -gt 8 ] &&   echo 'High load' | mail -s 'Server Load Alert' admin@yourdomain.com" >> /etc/cron.d/load-monitor

Tuning Apache on a DirectAdmin server is an iterative process β€” the right MaxRequestWorkers value depends on your specific mix of PHP applications, traffic patterns, and RAM. If load spikes persist after these changes, it's often a sign that a specific site or cron job is the bottleneck. For managed DirectAdmin servers where consistent performance is critical, CloudHouse's server management team can audit your configuration and implement the full PHP-FPM + Nginx stack tuned for your workload.

Get the Free Linux Server Admin Cheatsheet (PDF)

Essential commands for server management, networking, and troubleshooting β€” all on one printable page.

Running Linux servers? Let us manage them for you.

Our Managed Linux Server plans cover updates, security hardening, monitoring, and 24/7 incident response β€” so your servers stay up and your team stays focused.

  • Proactive OS patching and security updates
  • 24Γ—7 monitoring with instant alerting
  • Backup configuration and disaster recovery
  • Dedicated Linux engineers on call
See Pricing Plans β†’

What our customers say

β€œOur production server went down at 2 AM. CloudHouse had it back online in under 20 minutes. Incredible response time.”

Arun S.

CTO, SaaS Startup

β€œThey migrated our entire infrastructure from Ubuntu 18 to 22 with zero downtime. Couldn't have asked for better.”

Deepak N.

DevOps Lead

Frequently Asked Questions

High Apache process counts in DirectAdmin are usually caused by MaxRequestWorkers being set too high relative to available RAM, PHP running as mod_php (which loads PHP into every Apache process), or incoming traffic spikes and bot attacks. When Apache spawns more processes than RAM can hold, the kernel starts swapping and load spikes. The fix is to calculate a safe MaxRequestWorkers based on actual process size and RAM, switch to PHP-FPM to reduce per-process memory, and block attack patterns like xmlrpc.php floods.

Need this done for you?

Server Management Service

Managed Linux and Windows servers: monitoring, patching, security and 24/7 support.

Learn more

Book your free 15-minute diagnosis

A certified technician will call you back within 15 minutes during business hours.

Share this article

Leave a Comment

Comments (0)

Loading comments...