Common causes
- All PHP-FPM workers or app processes are busy, often because of a traffic spike or bot crawling
- The hosting account hit its CPU, process or entry-process limit
- A WordPress update was interrupted and left a .maintenance file in the site root
- Every server in an Nginx upstream or load balancer pool failed its health check
- A maintenance mode, rate limiter or WAF deliberately returns 503
- On IIS, the application pool stopped (HTTP Error 503. The service is unavailable.)
How to fix it
- Check for a stuck maintenance file. If the page says "Briefly unavailable for scheduled maintenance", delete the .maintenance file in the WordPress root, then rerun the failed update.
- Look at load and worker usage. Run uptime, top or htop to see CPU and memory. In the PHP-FPM log look for "server reached pm.max_children setting", which means requests are queuing for workers.
- Identify traffic causing the load. Count requests per IP or user agent in the access log, for example awk '{print $1}' /var/log/nginx/access.log | sort | uniq -c | sort -rn | head. Block or rate-limit abusive bots.
- Restart the backend. Restart PHP-FPM, the app server or the IIS application pool. If it recovers and fails again under load, the fix is capacity or slow code, not the restart.
- Tune worker limits. Increase pm.max_children only if there is free RAM (each worker typically uses 30-100 MB). Add page caching so most requests never reach PHP.
- Ask your host about account limits. On shared or CloudLinux hosting a 503 or 508 often means the account hit its resource limits. The host can show which limit was reached.
PHP-FPM pool (www.conf)
pm = dynamic
pm.max_children = 20
pm.start_servers = 4
pm.min_spare_servers = 2
pm.max_spare_servers = 6
pm.max_requests = 500 How to stop it happening again
- Use full-page caching and a CDN for anonymous traffic
- Rate-limit or block aggressive crawlers at the web server or CDN
- Monitor response time and worker usage so you scale before saturation
- Return 503 with a Retry-After header during planned maintenance