Website errors · Article 0139

How to Fix a 503 Service Unavailable Error

A 503 Service Unavailable response means that a server or an intermediary cannot currently handle a request. The cause may be scheduled maintenance, overloaded resources, an unavailable application process, or an unhealthy upstream service. This guide explains how to identify the failing layer and choose a safe correction.

Before you change anything: Record the time and exact URL of the failure. Back up relevant files and configuration before editing them. Change one thing at a time, and never publish passwords, private keys, API tokens, or customer information in diagnostic logs.

What does a 503 Service Unavailable error mean?

HTTP 503 is a server-side response indicating that the service is temporarily unable to handle the request. Unlike a 404 error, which means a requested resource was not found, a 503 generally indicates a temporary availability problem.

The response may come from the web server, application server, reverse proxy, content delivery network (CDN), hosting platform, or another service between the visitor and the website.

A 503 response does not identify the exact cause by itself. You need to establish which component generated it and inspect the corresponding logs or service status.

Common causes of a 503 error

Step 1: Determine whether the error affects the whole website

Start by checking the scope of the failure. Do not assume that the homepage and every other URL are affected in the same way.

  1. Open the homepage and record the response.
  2. Test one affected internal page.
  3. Test a relevant application workflow, such as a login page or API endpoint, if applicable.
  4. Compare the results with a page or service that is known to work.
  5. Record the exact time, URL, status code, and any request or trace ID shown in the response.

If every page returns 503, investigate shared infrastructure, maintenance, and overall resource availability. If only one route or application function fails, investigate the component responsible for that route.

Step 2: Check maintenance mode

A website may intentionally return 503 while maintenance is in progress. This can happen during application updates, server maintenance, or a deployment.

  1. Check your hosting dashboard for a maintenance notice or scheduled service interruption.
  2. Check whether a deployment or maintenance operation is still running.
  3. If you manage the application, inspect its maintenance configuration or maintenance flag.
  4. Confirm that the update or maintenance process has completed successfully.
  5. Disable maintenance mode only when it is safe to restore normal traffic.

For WordPress, check whether an update is still running and whether a temporary .maintenance file remains in the WordPress installation directory after an interrupted update. Do not delete files blindly. First confirm that no update is active and that the file is associated with the maintenance state.

If the hosting provider is performing maintenance, wait for its stated completion time or contact support. Repeatedly changing application settings will not fix an infrastructure maintenance window.

Step 3: Investigate server overload and resource limits

A server may return 503 when it cannot accept additional work. A sudden traffic increase is one possible cause, but inefficient queries, scheduled jobs, automated requests, and insufficient hosting capacity can produce similar symptoms.

Check the resource information available in your hosting control panel:

Compare the resource measurements with the timestamps when visitors received 503 responses. A resource limit shown in the same failure window is stronger evidence than a general assumption that traffic is too high.

If a specific background job, import, backup, or expensive request is responsible, investigate that workload. Do not simply purchase a larger hosting plan or repeatedly restart the server without identifying the limiting resource.

Step 4: Check application processes and PHP workers

Websites that use PHP may depend on PHP-FPM or another PHP process manager. If the process is stopped, unhealthy, or unable to accept additional requests, visitors may receive an availability error.

  1. Check the hosting dashboard or service manager for PHP process health, if your plan provides access.
  2. Review PHP and application logs around the failure timestamp.
  3. Look for worker exhaustion, process termination, memory exhaustion, or repeated application crashes.
  4. Check whether a recent plugin, theme, application release, or configuration change increased resource usage.
  5. Ask your hosting provider to inspect PHP-FPM or the relevant application service if you do not have permission to manage it.

For managed or shared hosting, you may not be able to restart PHP-FPM directly. Use the provider's supported controls or request assistance instead of attempting privileged commands that are unavailable on your plan.

Step 5: Check the origin server and upstream services

A reverse proxy, web server, or load balancer may return 503 when the application server behind it is unavailable or marked unhealthy.

Check the following where you have access:

If the proxy cannot reach the origin, verify the configured upstream address, port, and connection settings against the actual server configuration. Avoid changing these values without confirming the intended architecture.

Step 6: Identify whether a CDN or proxy generates the 503

If your website uses a CDN, reverse proxy, web application firewall, or load balancer, the error may originate from that intermediary rather than the hosting server.

  1. Inspect the response headers for provider-specific server identifiers or diagnostic request IDs.
  2. Check the CDN or proxy dashboard for service incidents, origin errors, rate limits, and security events.
  3. Review the origin server logs at the same timestamp to see whether the request reached it.
  4. Compare the intermediary's diagnostic information with the hosting provider's logs.
  5. Ask the CDN or hosting provider to trace the request if the source remains unclear.

Do not permanently bypass a CDN, disable a firewall, or expose an origin server simply to test a 503 response. If a direct-origin test is necessary, use an authorized and controlled method that preserves the site's security protections.

Step 7: Review recent deployments and configuration changes

If the error began immediately after a deployment, plugin update, server change, or configuration edit, compare the current environment with the last known working version.

A rollback should restore a known compatible version. Do not restore an old database backup or overwrite current data merely because a deployment failed; those actions can cause data loss.

Step 8: Understand the Retry-After response header

A server may include a Retry-After header with a 503 response. This header can tell clients when to try the request again.

For example, a response may include:

HTTP/1.1 503 Service Unavailable
Retry-After: 120

In this example, the value 120 represents a suggested delay of 120 seconds before retrying. A server can also express the retry time as an HTTP date.

If you operate the application, configure retry behavior carefully. Automated clients should avoid sending repeated requests immediately during an outage because aggressive retries can increase server load. Use reasonable delays and backoff behavior where appropriate.

The absence of a Retry-After header does not reveal the cause of the error or guarantee that the service will recover within a particular period.

How to verify that the 503 error is fixed

After making an evidence-based correction, verify the original problem instead of relying only on the homepage loading successfully.

  1. Repeat the exact request that originally returned 503.
  2. Confirm that the response status and page content are correct.
  3. Test other important pages and application workflows.
  4. Check server, application, and proxy logs for continuing errors.
  5. Review resource metrics to confirm that the underlying limit or overload condition has been resolved.
  6. Monitor the website for a reasonable period to check whether the error returns under normal traffic.

If a CDN or browser cache is involved, account for its caching behavior before concluding that the correction has failed. A cached error or stale response may not represent the current origin status.

Common mistakes to avoid

When to contact your hosting provider

Contact your hosting provider when you cannot access the relevant server processes, resource metrics, proxy logs, or infrastructure settings.

Include the following information in your support request:

Ask the provider to check server resource limits, application process health, upstream connectivity, and relevant proxy or web-server logs. A precise request is more useful than asking for a general server reset.

Frequently asked questions

Is a 503 error temporary?

It is intended to indicate temporary unavailability, but the duration depends on the cause. A short maintenance window may resolve on its own, while a failed application process or persistent resource limit requires investigation.

Can high traffic cause a 503 error?

Yes. High traffic can exhaust available resources or application workers. However, traffic is only one possible cause. Check resource metrics and logs before deciding that the server needs more capacity.

Does a 503 error mean my website has been hacked?

No. A 503 response does not by itself indicate a security breach. Investigate the server, application, maintenance state, and upstream services. If logs show suspicious activity, investigate that separately using appropriate security procedures.

Can a WordPress plugin cause a 503 error?

It can contribute to the problem if it causes excessive resource use, triggers failing application requests, or interferes with an update. Review WordPress and PHP logs and compare the failure with recent plugin changes before disabling or rolling back anything.

What is the difference between a 502 and a 503 error?

A 502 Bad Gateway response generally indicates that a gateway or proxy received an invalid response from an upstream server. A 503 Service Unavailable response indicates that the service is currently unable to handle the request. The exact cause in either case must be established from the relevant server and proxy evidence.

Will refreshing the page fix a 503 error?

Only if the unavailability is brief and the service has recovered. If the error continues, repeated refreshing will not correct a maintenance problem, exhausted resource limit, or failed upstream service.

Related troubleshooting guides