Ffile2fix
Sign in Get started

Fix "503 Service Unavailable"

Service Unavailable
The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later.

A 503 means the server is up but refuses to handle the request right now, because it is overloaded, in maintenance mode or has no healthy backend to send it to. Find out which by checking resource usage, maintenance flags and the backend service.

Also appears as: 503 Service Temporarily Unavailable · HTTP Error 503. The service is unavailable. · Briefly unavailable for scheduled maintenance. Check back in a minute. · upstream server temporarily disabled while connecting to upstream

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

  1. 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.
  2. 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.
  3. 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.
  4. 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.
  5. 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.
  6. 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

Frequently asked questions

Is a 503 temporary?

By definition it should be. Search engines treat a short 503 as a temporary outage and come back later, especially if you send a Retry-After header.

Why do I get 503 only at certain times of day?

That points to load: scheduled cron jobs, backups or crawler bursts using all workers at the same time. Compare the times with your cron schedule and access log.

Should I use 503 for maintenance mode?

Yes. 503 with Retry-After tells crawlers the outage is intentional and temporary, which is better than serving a 200 maintenance page.