VPS Server Reboot Issue: Root Cause, Diagnosis, and Permanent Fix
Unexpected server reboots and websites becoming inaccessible are among the most frustrating problems for VPS users.
Many VPS environments experience random downtime, Apache freezes, or sudden performance issues without clear error messages.
This article explains a real-world VPS reboot issue, the exact root cause, and the permanent solution,
based on a production server running AlmaLinux, cPanel, Apache, PHP-FPM, and WordPress.
Server Environment
- Hosting Type: VPS
- Operating System: AlmaLinux v8.10 (KVM)
- Control Panel: cPanel & WHM
- Web Server: Apache (MPM Worker)
- PHP Version: PHP 8.1 (ea-php81)
- RAM: 4 GB
Problem Symptoms
- Website randomly stopped opening
- Apache service running but pages timed out
- Multiple manual reboots required in a single day
- No clear fatal error in Apache logs
- High load during traffic spikes
Even when RAM usage appeared normal, the server would suddenly freeze.
Apache Log Warnings (Hidden Clue)
AH00286: server reached MaxRequestWorkers AH00287: server is within MinSpareThreads of MaxRequestWorkers AH00288: scoreboard is full
These warnings clearly indicate Apache worker exhaustion,
not malware or hardware failure.
Root Cause Analysis
1. No Swap Memory
The VPS had zero swap configured. Once RAM was exhausted, Linux had no fallback,
causing Apache and PHP processes to freeze instead of failing gracefully.
2. Dangerous PHP Memory Configuration
memory_limit = 4096M
On a 4GB RAM server, a single PHP request could consume all available memory
and instantly lock up the server.
3. PHP-FPM Misconfiguration
- PHP-FPM disabled or underconfigured
- Very low process recycling
- Apache workers queued PHP requests endlessly
4. WordPress & Bot Traffic
admin-ajax calls, REST API requests, and bot scans further increased concurrent load.
Permanent Fix (Step-by-Step)
Step 1: Enable Swap Memory
fallocate -l 4G /swapfile chmod 600 /swapfile mkswap /swapfile swapon /swapfile
Step 2: Fix PHP Memory Limits
memory_limit = 512M max_execution_time = 60 max_input_time = 60 max_input_vars = 3000 post_max_size = 64M upload_max_filesize = 64M display_errors = Off
Step 3: Enable & Tune PHP-FPM
- Max Children: 8
- Max Requests: 300
- Process Idle Timeout: 10s
Step 4: Restart Services
systemctl restart ea-php81-php-fpm systemctl restart httpd
Final System Health Check
free -h
Healthy indicators include available RAM, small swap usage, and low load averages.
Final Verdict
This was not a hardware issue. The real causes were:
- Excessive PHP memory limits
- No swap memory
- Improper PHP-FPM configuration
After fixing these issues, the server became fully stable with no further reboots.
Stop VPS Crashes. Start Scalable Hosting.
Afojet VPS Hosting is built for WordPress, PHP-FPM, and production workloads —
pre-optimized for stability and performance.
₹5,349 / month
₹2,999 / month
Flat ₹2,350 OFF (≈44% savings)