Apache 503 Error: Service Unavailable

Diagnose causes of unavailability with Apache.

The 503 Service Unavailable error under Apache indicates the server temporarily cannot process the request. Unlike a 500 error, it's usually a capacity or configuration problem, not code.

Common causes include: overload, backend down when Apache acts as proxy, or scheduled maintenance. This guide helps you identify and resolve the problem.

Main Causes

  • mod_proxy backend down: Apache as reverse proxy cannot reach backend (Tomcat, Node, etc.).
  • MaxRequestWorkers reached: All Apache workers are busy, new connections are rejected.
  • Maintenance mode: A .htaccess or VirtualHost file intentionally returns 503.

Diagnosis

  • Apache logs: Check /var/log/apache2/error.log for detailed error message.
  • server-status: Enable mod_status to see workers and their state.
  • Backend health: If proxy, verify backend responds directly.

Solutions

  • Increase MaxRequestWorkers: Adjust value in mpm_prefork or mpm_event based on available RAM.
  • Restart backend: If mod_proxy, restart the backend service (Tomcat, Node, etc.).
  • Disable maintenance: Check .htaccess or VirtualHost rules that force 503.

Frequently Asked Questions

How to know if it's overload or backend down?

Apache logs tell you. "proxy: error" = backend. "server reached MaxRequestWorkers" = overload.

Is 503 better than 500 for visitors?

Yes, 503 indicates a temporary problem. Google crawlers retry later instead of considering the page broken.

How to do proper maintenance with 503?

Configure a maintenance page with "Retry-After" header to indicate when to retry.

Does MoniTao differentiate 503 from other errors?

Yes, MoniTao shows you the exact code. You can configure different alerts for 503 (temporary) vs 500 (code error).

Ready to Sleep Soundly?

Start free, no credit card required.