Updated: 4 November 2026 · Applies to: nginx 1.28.3 and Apache 2.4.66 with PHP-FPM 8.5 (tested on Ubuntu 26.04), cPanel shared hosting with CloudLinux, WordPress and Cloudflare

503 Service Temporarily Unavailable means the web server is running but will not handle your request right now: it is overloaded, a rate limit was hit, the site is in maintenance mode, or the application behind the web server is not available. nginx calls the error "503 Service Temporarily Unavailable"; Apache and most other software say "503 Service Unavailable". It is the same status code, and HTTP defines it as temporary, so the server may send a Retry-After header saying when to try again.

As a visitor, wait a minute and reload. As the site owner, find out which program sent the 503, then read its error log. The steps below follow that order.

1. Find out who sent the 503

Run curl -I https://example.com/ or look at the bottom of the error page:

  • nginx shows a plain page with the version underneath. Lab output from our test server (some headers left out):
    HTTP/1.1 503 Service Temporarily Unavailable
    Server: nginx/1.28.3 (Ubuntu)
    Content-Type: text/html
    
    <html>
    <head><title>503 Service Temporarily Unavailable</title></head>
    <body>
    <center><h1>503 Service Temporarily Unavailable</h1></center>
    <hr><center>nginx/1.28.3 (Ubuntu)</center>
    </body>
    </html>
  • Apache shows "Service Unavailable" and The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later.
  • WordPress shows Briefly unavailable for scheduled maintenance. Check back in a minute. (see section 5).
  • Cloudflare: according to Cloudflare, if the error page contains cloudflare or cloudflare-nginx, Cloudflare generated it; otherwise it came from your server.
  • Shared hosting with CloudLinux shows 508 Resource Limit Is Reached instead of a 503 when the site hits its entry process limit, according to CloudLinux (see section 4).

2. Fix a 503 from nginx

Open the error log (/var/log/nginx/error.log, or the error_log path in your server block) and match the message:

  1. Rate limit (limit_req). According to the nginx documentation, requests over the limit are rejected with 503 by default. In our lab, a zone with rate=1r/s and five quick requests gave 200 503 503 503 503, and the error log showed:
    [error] 8465#8465: *22 limiting requests, excess: 0.989 by zone "one", client: 127.0.0.1, server: , request: "GET /limited.txt HTTP/1.1", host: "127.0.0.1:8080"
    Allow short bursts: with limit_req zone=one burst=5 nodelay; the same test gave six times 200 before the first 503. To send 429 Too Many Requests instead of 503, add limit_req_status 429; (tested: 200 429 429). Pages, images and API calls often need different limits.
  2. Connection limit (limit_conn). With limit_conn addr 1; on a PHP script that took three seconds, two of three parallel requests got 503 and the log showed limiting connections by zone "addr". Raise the number, or apply the limit only to the paths that need it.
  3. Maintenance mode left on. Search the configuration for return 503 or a maintenance flag: sudo grep -rn "503" /etc/nginx/. A tested maintenance setup that sends a custom page and tells browsers and crawlers to come back in ten minutes:
    error_page 503 /maintenance.html;
    location = /maintenance.html { internal; add_header Retry-After 600 always; }
    location / {
        if (-f /var/www/maintenance.on) { return 503; }
        try_files $uri $uri/ =404;
    }
    touch /var/www/maintenance.on switches it on, deleting the file switches it off.
  4. The application sent the 503. When nginx is a reverse proxy, it passes on a 503 from the app behind it. Add $upstream_status to your log format to see who answered. In our lab log, 503 upstream_status=- was nginx itself and 503 upstream_status=503 came from the backend. Then check the application’s own log.

Test and reload after every change: sudo nginx -t && sudo systemctl reload nginx (see nginx configuration explained). A stopped PHP-FPM does not cause a 503 on nginx: in our test it gave 502 with connect() to unix:/run/php/php8.5-fpm.sock failed (2: No such file or directory). That is covered in 502 Bad Gateway; a slow backend gives 504 Gateway Timeout.

3. Fix a 503 from Apache

Apache returns 503 when it cannot reach the backend it passes requests to. In our lab, both a stopped app behind ProxyPass and a stopped PHP-FPM gave 503. The error log (/var/log/apache2/error.log on Debian and Ubuntu, /var/log/httpd/error_log on AlmaLinux) showed:

AH00957: http: attempt to connect to 127.0.0.1:9999 (127.0.0.1:9999) failed
AH01114: HTTP: failed to make connection to backend: 127.0.0.1
AH02454: FCGI: attempt to connect to Unix domain socket /run/php/php8.5-fpm.sock (localhost:8000) failed
AH01079: failed to make connection to backend: localhost
  1. Find the PHP-FPM service: systemctl list-units '*fpm*'.
  2. Start it and check that it stays up: sudo systemctl restart php8.5-fpm, then systemctl status php8.5-fpm (use your version). In our test the page returned 200 as soon as PHP-FPM ran.
  3. If it is running, compare the socket in the error with the real one (ls /run/php/) and with the SetHandler "proxy:unix:..." line in your Apache configuration.
  4. For a Node.js or other app behind ProxyPass, start the app and make sure it listens on the address and port in the ProxyPass line.

4. 503 on shared hosting (cPanel with CloudLinux)

On shared hosting each account has resource limits. According to CloudLinux, hitting the entry process limit (simultaneous requests) gives error 508, and hitting the memory (PMEM) or process (NPROC) limit usually gives 500 or 503. Our shared and reseller plans allow up to 1 vCPU core, 1 GB of RAM, 20 entry processes and 100 processes per account (section 4 of our Acceptable Use Policy).

  1. In cPanel, open Metrics > CPU and Concurrent Connection Usage (CloudLinux’s resource usage tool) to see whether and when a limit was hit, then click Details.
  2. Check what used the resources: bots and login attacks on wp-login.php or xmlrpc.php, a heavy plugin, slow database queries, or cron jobs. Our AUP allows each cron job at most every 15 minutes and MySQL queries up to 30 seconds.
  3. Add page caching, block abusive bots and update or replace slow plugins.

More detail: CloudLinux 500, 503 and 508 errors. On LiteSpeed servers with CSF, see error 503 when LiteSpeed is used. If the site keeps reaching the limits with normal traffic, it needs more resources than shared hosting gives: a KVM VPS gives you guaranteed RAM and CPU and full root access.

5. WordPress: Briefly unavailable for scheduled maintenance

During updates WordPress creates a .maintenance file in its main folder and answers every request with 503, a Retry-After: 600 header and the message above (from the WordPress source code). If an update is interrupted, the file stays. According to the WordPress code, it is ignored once it is older than 10 minutes, but you can end it at once: delete .maintenance in the WordPress folder with the File Manager, SFTP or rm, then rerun the update that failed. See WordPress maintenance mode.

6. 503 behind Cloudflare

If the 503 page does not mention Cloudflare, your server sent it: work through sections 2 to 5 on the server. According to Cloudflare, a 503 that contains cloudflare points to a problem in a Cloudflare data centre; their support asks for the time of the error and the output of https://example.com/cdn-cgi/trace.

Planned maintenance and search engines

The HTTP standard (RFC 9110) defines 503 for a temporary overload or scheduled maintenance, so for planned downtime send a 503 with Retry-After, as in the nginx example, rather than a normal page that says "closed". According to Google, 5xx errors make its crawler slow down; URLs stay in the index for a while, but are dropped if the errors continue. Keep maintenance windows short.

If a 503 keeps coming back on your VPS or dedicated server and you would rather have someone look at the logs with you, our Hire an Expert engineers can help.

Official documentation: nginx limit_req, CloudLinux limits and Cloudflare error 503.

Related services

Web hosting

shared hosting on Virtualmin with NVMe storage, free SSL and email.

SSL certificates

DV, OV and wildcard, with free installation help.

Reseller hosting

white-label cPanel hosting for your own clients.

Was this answer helpful?

Still stuck? Open a ticket