503 Service Unavailable

DIRECT ANSWER
A 503 Service Unavailable response means the service cannot handle the request at that time. Common causes include exhausted CPU, memory, worker, or connection capacity; incomplete maintenance mode; an unavailable database or other dependency; or a proxy, WAF, rate limiter, or load balancer returning 503. Identify which layer generated the response, then review logs and resource usage before changing settings.
Key takeaways
- A 503 may clear when demand drops, but it can persist until maintenance mode is cleared, a dependency is restored, or a configuration problem is corrected.
- Identify whether the application, reverse proxy, CDN, WAF, or load balancer generated the response before changing application settings.
- Check CPU, memory, active connections, web-server workers, PHP-FPM workers, and database connections at the time of failure.
- After an interrupted WordPress update, an orphaned
.maintenancefile can keep the site unavailable. - If resources are normal, inspect database and cache connectivity, internal APIs, rate limits, WAF rules, and load-balancer health checks.
- Verify the repair under conditions similar to those that originally triggered the 503.
Site Administrator
What this error means & how to recognize it
- The browser, API client, or monitoring tool reports 503 Service Unavailable or Service Temporarily Unavailable.
- The error appears during heavy traffic and clears when demand falls.
- The site remains unavailable after a CMS update or deployment because maintenance mode was not cleared.
- The error continues while a required database, cache service, or upstream API is unavailable.
- Only particular URLs, clients, request patterns, or backends receive 503 responses because of rate limiting, a WAF rule, routing, or an unhealthy load-balancer health check.
- Response headers or a proxy-generated error page indicate that the request may not have reached the application.
Root causes, ordered by likelihood
- Server overload — CPU, memory, active connections, web-server workers, PHP-FPM workers, or database connections are exhausted by normal demand or a traffic spike.
- Stuck maintenance mode — A CMS update or deployment enables a maintenance flag but does not remove it after an interruption. In WordPress, this may be an orphaned
.maintenancefile. - Unavailable required dependency — The application cannot reach a database, cache layer, or internal API needed to serve the request. The dependency may be running but inaccessible from the application host or network.
- Intentional rate limiting or WAF behavior — A rate limiter or web application firewall may return 503 responses when traffic exceeds a threshold or matches a security rule.
- Faulty load-balancer health check — A check may mark healthy backend instances unavailable because it uses the wrong path or expects the wrong response code.
- Proxy or upstream configuration problem — A reverse proxy, CDN, or upstream service may generate the 503 before the application receives the request.
How to fix it
1. Identify which layer generated the 503
Check response headers and compare logs from the application, web server, reverse proxy, CDN or WAF, and load balancer. Determine whether the response came from the application or was generated before the request reached it. This prevents changing application settings when the blocking layer is elsewhere.
2. Check resource usage at the time of failure
Review CPU, memory, active connections, web-server workers, PHP-FPM workers if applicable, and database connections. Use read-only monitoring tools such as top or htop, hosting dashboards, and infrastructure monitoring to determine whether a limit was reached.
- If a resource was near capacity, treat the incident as an overload or capacity problem.
- If resource usage was normal, investigate maintenance state, dependencies, rate limits, WAF rules, and health checks.
3. Clear an incomplete maintenance state
For WordPress, confirm that the update has completed or that the site is authorized for maintenance, then connect through SFTP and check the site root for a file named .maintenance. If the update completed but this file remains, remove it and test the site again. Removing the file changes the site’s maintenance state, so do not do this during an active update or deployment.
Other platforms and deployment tools may use a flag file or environment variable. Check the update or deployment process to identify what enables maintenance mode and whether its cleanup step ran after an interrupted process.
4. Test dependencies from the application server
Confirm that the database, cache layer such as Redis or Memcached, and required internal services are running and reachable from the application server. Check for connection errors, authentication failures, timeouts, and service-log entries.
A dependency can be operational in general but unreachable from the specific application host because of network access, credentials, routing, or a service-level failure.
5. Address genuine overload
Identify the limiting resource before increasing any setting. The bottleneck may be CPU, memory, database connections, web-server connections, or PHP-FPM workers.
For short-term relief, reduce expensive work, increase a limit only when the host has sufficient spare capacity and the change is authorized, or add caching for suitable pages. For recurring demand, consider a CDN or cache layer and additional backend capacity rather than repeatedly raising limits.
6. Check rate limits, WAF rules, and load-balancer health checks
Review Nginx, Apache, CDN, or other proxy and security logs for rules that intentionally return 503 responses. Inspect health-check paths, expected status codes, and backend registration. If only particular URLs, clients, or backends fail, this evidence can distinguish traffic control or routing from a whole-site outage.
7. Verify the repair
Repeat the request that failed and check application, proxy, and dependency logs. Confirm that normal requests succeed and, where possible, test under a similar traffic level or time of day. Make sure the fix addresses the triggering condition rather than only clearing a temporary symptom.
Prevention & how to verify the fix
- Ensure deployment and update scripts remove maintenance flags in a cleanup or
finallystep, including after partial failures. - Monitor CPU, memory, active connections, worker usage, and database connections, with alerts before capacity is exhausted.
- Cache suitable pages and database work so traffic spikes consume less backend capacity.
- Test load-balancer health checks against the correct path and expected response code.
- Review rate-limit and WAF changes so intentional 503 responses can be distinguished from service failures.
- Keep application, proxy, dependency, and infrastructure logs available for the same time range so failures can be correlated.
- After a fix, verify the site under conditions similar to those that triggered the original error.
When to get outside help
Contact your hosting or infrastructure provider when 503 responses persist after resource usage is normal, no maintenance flag is present, dependencies are reachable, and proxy or WAF rules appear correct. Provider-side throttling, platform-level health checks, or dependency outages may not be visible from inside your account. Include the error times, affected URLs, response headers, resource graphs, and relevant application, proxy, and dependency logs.
Frequently asked questions
Is a 503 Service Unavailable error permanent?
Usually, a 503 means the service cannot handle the request at that moment rather than that the resource has permanently moved or been removed. It can continue until overload ends, maintenance is cleared, a dependency is restored, or a configuration problem is corrected.
Can heavy traffic cause a 503?
Yes. A traffic spike can exhaust CPU, memory, active connections, web-server workers, PHP-FPM workers, or database connections. Check monitoring and logs at the time of the error before increasing limits.
How do I fix a 503 after a WordPress update?
Confirm that the update is complete, then connect through SFTP and check the WordPress site root for an orphaned .maintenance file. If the update has finished but the file remains, remove it and test the site. If the error continues, inspect the update, application, and dependency logs.
What is the difference between an application 503 and a proxy 503?
An application-generated 503 is usually accompanied by application or framework log entries showing that the app cannot serve the request, often because a dependency is unavailable. A proxy, CDN, WAF, or load balancer may return its own 503 before the request reaches the application. Response headers and logs from each layer help identify the source.
Why does a 503 affect only some requests or users?
Selective 503 responses can result from a rate limit, WAF rule, routing issue, unhealthy backend, or a health check that removed some instances from service. Compare the failing URL, client, request pattern, and backend with a successful request.
Should I increase server limits to stop 503 errors?
Only after identifying the exhausted resource and confirming that the host has enough CPU, memory, and other capacity. Raising a limit without addressing the bottleneck can move the failure to another resource; caching or additional backend capacity may be the better long-term solution.
Further documentation
For authoritative follow-up, consult the documentation for the web server, reverse proxy or CDN, WAF, load balancer, hosting platform, CMS, and dependency services used in the affected environment. The most relevant references will explain how that product reports 503 responses, maintenance state, worker or connection limits, health checks, and rate-limiting decisions.