🚦
Hosting

503 Service Unavailable: what to do when the server is overloaded

18.11.2026
← All articles

A 503 Service Unavailable differs from other 5xx errors in one key way: it signals a temporary state. The server exists and runs, but right now it can't handle the request or is deliberately refusing it. Causes range from maintenance mode and traffic spikes to rate limiting and hitting your hosting plan's resource limits. So the first question is whether this is planned, or whether the server is genuinely choking.

When 503 is correct and when it's a problem

The HTTP standard reserves 503 for temporary unavailability, so using it on purpose during an upgrade or database migration is right: search engines treat it as a short outage rather than dropping pages immediately, especially with a Retry-After header. The trouble starts when 503s appear unexpectedly, which usually means resources have run out. Prolonged or frequent 503s drive visitors away and can hurt search visibility.

Main causes

Stuck maintenance mode

While updating, WordPress creates a .maintenance file in the site root. If the update is interrupted, the file stays and the site is stuck. Delete it and rerun the update:

ls -la ~/www/example.uz/.maintenance
rm ~/www/example.uz/.maintenance

The path depends on your hosting layout. Laravel has a similar mechanism with php artisan down and php artisan up.

Rate limiting

Nginx's limit_req and limit_conn return 503 by default for requests over the limit. Limits that are too strict hit real users too. Return 429 instead so you can tell limits apart from real overload:

limit_req_zone $binary_remote_addr zone=perip:10m rate=10r/s;

server {
    location / {
        limit_req zone=perip burst=20 nodelay;
        limit_req_status 429;
    }
}

Apply limits to dynamic pages, login and search rather than static files.

Plan resource limits and busy backends

Shared hosting accounts have limits on CPU, memory and concurrent processes so one site can't sink the whole server. When a site hits them, new requests can't get a process and visitors see 503. Heavy plugins, uncached dynamic pages, runaway cron jobs and aggressive bots are the usual causes. On a VPS, exhausted PHP-FPM workers and low memory can surface as 502, 503 or 504 depending on which layer gives up first, so always check logs, not just the code.

Diagnosing load

uptime
free -m
top -o %CPU
sudo tail -n 100 /var/log/nginx/access.log | awk '{print $1}' | sort | uniq -c | sort -rn | head

Compare the uptime load averages with your CPU core count. The last command lists the most active IPs among recent requests; one address far ahead of the rest suggests a bot or attack.

Example: a sale day at a Fergana shop

An appliance shop in Fergana announced a big sale in its Telegram channel with a link to the site. Within minutes far more shoppers than usual arrived, every product page hit the database uncached, the hosting account reached its resource limit and the site started returning 503. Before the next promotion the shop enabled page caching, compressed product images and optimised heavy filter queries, and the site handled the same traffic without stopping. If resources still fall short, a bigger plan or a VPS is the next step.

Announcing planned maintenance properly

location / {
    if (-f /var/www/example.uz/maintenance.flag) {
        return 503;
    }
    try_files $uri $uri/ /index.php?$args;
}

error_page 503 @maintenance;
location @maintenance {
    add_header Retry-After 3600 always;
    root /var/www/maintenance;
    rewrite ^ /index.html break;
}

Create maintenance.flag to start and delete it to finish, no reload needed. Keep maintenance short and schedule it for low-traffic hours.

On shared hosting

Check for a stuck .maintenance file, then use the logs in the ISPmanager panel to see which pages and IPs generate the most requests. Caching, replacing heavy plugins and restricting unwanted bots often cut load significantly. If the site has genuinely outgrown its plan, you can change it in the sayt.uz cabinet, and support can tell you which limit is being hit.

Related articles

📈 When to upgrade your hosting plan: the real signs ⚙️ Self-Hosting n8n: Step-by-Step Setup with Docker, Nginx and SSL ⚙️ How to Change the PHP Version and Settings in ISPmanager ⏰ How to Add a Cron Job in ISPmanager: Schedule, Command, Checks
🌐 Language
🇺🇿 O'zbek 🇺🇿 Ўзбек 🇷🇺 Русский 🇬🇧 English ✓