Opyntel

503 Service Unavailable: what it means and how to fix it

A 503 Service Unavailable means the server is reachable but cannot take the request right now. It is overloaded, starting, scaling, in maintenance, or has no healthy instance to route to. Unlike a 500, a 503 says the problem is temporary.

What causes a 503

  • No healthy instance. Every instance behind the load balancer is failing its health check.
  • Starting or scaled to zero. The service is still booting, or was put to sleep when idle and is waking up.
  • Too much traffic for the instances running, so the platform or the app sheds load.
  • A dependency is down. Some apps answer 503 on purpose when the database or a cache they need is unreachable.
  • Maintenance mode, switched on for a migration or a deploy.

How long does a 503 last?

As long as the cause. A cold start or a deploy clears in seconds to minutes; an overload lasts until traffic drops or the service scales. Servers can send a Retry-After header with a 503 to say when to try again, and well-behaved clients and crawlers respect it.

How to fix a 503

  1. Check the health checks. Find out whether the instances are failing them, and why: a slow boot, a wrong path or a dependency.
  2. Check the instance count. Look for a deploy or scale event in progress, or a service scaled to zero.
  3. Look for saturation. CPU or memory at the limit means you need more instances or a faster app.
  4. Read the logs for a database, cache or API the app cannot reach.

503 on app platforms

App platforms return 503 when no instance is ready to serve: while a service starts, after it fails its health check, or while it wakes from sleep on plans that stop idle services. A 503 that appears only on the first request after a quiet period is a cold start. One that persists is a service that never became healthy; see 5xx errors for how to trace it.

How Opyntel catches 503s

Opyntel alerts when a service’s error rate crosses your threshold, and when a service goes down or keeps restarting, by email, Slack or SMS depending on your plan. A service flapping between healthy and unhealthy shows as one story on one dashboard: the errors, the restarts and the deploy that started them.

FAQ

503 Service Unavailable questions, answered

What it means, whose fault it is and how it differs from a 502.

The server is up but cannot handle the request right now, usually because it is overloaded or starting.

The server’s. Reloading later usually works; if the site is yours, check its health checks and capacity.

A 502 means the proxy reached for the app and got a bad answer. A 503 means there was no healthy app to send the request to.

The alerts your platform doesn’t send.

One dashboard for everything you run, with the alerts your platforms leave out. Read-only, nothing to install in your apps.

See how it works