Error 503 Service Unavailable, What Is And How To Fix It

Error 503 Service Unavailable

Understand the error HTTP 503 Service Unavailable: What are the causes and how to fix them.

Table of Contents

What is the 503 Service Unavailable error?

The error code 503 Service Unavailable “Service Unavailable” indicates that the web server is working correctly, but it is not prepared to respond to the request at the given moment.

It is a temporary error, probably due to maintenance, restarting services, and therefore the error should disappear. But it’s not always like that.

Different 503 error messages

  • 503 Service Unavailable
  • HTTP Server Error 503
  • HTTP Error 503
  • 503 Service Temporarily Unavailable
  • Error 503 Service Unavailable
  • Service Temporarily Unavailable. The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later.

503 Service Unavailable causes

Unlike other similar error codes, the 503 means that the server is online and working, but may not be accessed at this moment.

Here you have a list of all the different causes:

  • The server is restarting or just booting and not yet ready.
  • Your server is alive but cannot handle more connections.
  • Certain page requests consume resources excessively.

How to fix the 503 Service Unavailable error code?

You can follow the next steps to find and fix the 503 error:

1 Verify your server is up and running

If you are starting your server or restarting it after modifying some configuration parameter, it is normal for this error to appear. Your server is performing tasks, it is able to respond with the error 503, but it is still not ready to serve the requests.

It could also happen that a service, for example, php-fpm, is not working correctly and your server is not able to respond to requests.

At Wetopi, this error may appear during the Server start, Service restart, Clone to Staging, etc. During the short period in which you operate your server, the load balancers continue to expose your website, but since your server is not fully functional, the load balancers respond to you with a temporary error, like “503 Service Unavailable”. In this case, the solution is simple: wait a few more seconds.

2 Verify your server load

If the web server reaches its limits, it will not be able to respond correctly to all requests. Since your server is partially operational, it may respond with a 503 Service Temporarily Unavailable.

The reason for an overload on your server could be an unexpectedly high interest, a spike in audience or even a DoS or DDoS (Distributed Denial of Service) attack.

Fix a Denial of Service attack

If you are facing a DoS attack or much worse a DDoS, this means that someone is using a botnet to help overload the server capacity and cause your website to crash.

If your website has behind it a complex CMS like WordPress, it can be relatively easy to overload the server. The main reason is that many pages escape cache systems. These non-cacheable pages, if they also require a high processing time, make it easy for simple DoS attacks, with little concurrency, to end up exhausting your server connections.

To deal with denial of service attacks, the best solution is to be protected by a CDN or Firewall service capable of filtering traffic and that in turn has an infrastructure to stop DoS and DDoS attacks.

At Wetopi, as WordPress specialists, we know how important it is to add strong measures of security.
We apply three techniques to filter traffic:

Shared security heuristic learning,
Blacklisting from external sources and
Mitigation of DDoS attacks.

How to deal with traffic spikes

If the traffic is legitimate, what we need is to be able to respond to these requests. The solutions to lack of resources are obvious:

  • Add a good cache system to your website.
  • If the caching system is not enough, increase the resources of your server.
  • If you cannot afford an increase in resources, the alternative is to lighten your website.
    If you work with WordPress:
    • reduce the number of plugins to the essential minimum.
    • If you’re hosted with us, Wetopi, we can help you with our WordPress Performance Optimization Analysis service:
WPO WordPress Performance Analysis

3 WordPress takes too much CPU

If you are serving your web page with the WordPress content manager, it may happen that you are not facing traffic peaks but that in certain page requests your WordPress begins to consume excessive resources.

You may not detect these micro shortages due to overload. Here, what could be causing the appearance of the HTTP 503 error, is that, in a request or section of your website, the combination of Plugins and Theme in a request or section of your website, exhausts the resources momentanously.

To confirm that this is your situation, try the following:

  • identify one page request causing this 503 error.
  • disable all plugins,
  • try to reproduce the error,
  • If the error goes away, then the 503 HTTP Error is caused by an incompatibility with one or more WordPress plugins.

IMPORTANT: it does not always have to be a conflicting plugin. You could simply be facing a problem of lack of resources or a problem with a malfunctioning database.

How to solve problems with WordPress plugins

To find the plugin causing the problem, we recommend following this process:

Save you website: don’t test in production!

When testing new server configurations, it is highly recommended to work on a “localhost” or “Staging” server.

If you don’t have a development WordPress server, signup at wetopi, it’s FREE.
  • Disable all your WordPress Plugins.
  • Check the page giving the HTTP 503 error.
  • If the page works, reactivate one of the plugins from the disabled list and go back to step 2.
  • If the page throws the error, this last plugin you activated is potentially the one causing the conflict that leads to the HTTP 503 error.

Check your database health

If you made it this far and none of the above methods work, chances are that the 503 error is caused by a database bottleneck, table inconsistency, etc.

The Repair and Optimize Database commands fix problems and improve the performance of your database.

To verify and repair the database, we advise you to follow these steps:

  • First of all, it is always wise to look for error information in the log files.
  • Second, backup your database.
  • Finally, repair and/or optimize the tables and indexes of your database.
Repair tables from phpMyAdmin
This screenshot shows how to repair MariaDB or MySQL database tables from the phpMyAdmin management panel.

If you are hosted on Wetopi and need urgently technical help, at Wetopi you have “Micro Tasks” services: blocks of engineer time to help you fix any technical issue related to your WordPress.

WordPress Micro Task Help from qualified engineers
At Wetopi you can hire WordPress technical assistance for micro tasks.

We are techies passionate about WordPress. With wetopi, a Managed WordPress Hosting, we want to minimize the friction that every professional faces when working and hosting WordPress projects.

Not a wetopi user?

Free full performance servers for your development and test.
No credit card required.

All HTTP Status Codes

200 OK

201 Created

202 Accepted

203 Non-Authoritative Information

204 No Content

205 Reset Content

206 Partial Content

207 Multi-Status

208 Already Reported

226 IM Used

300 Multiple Choices

301 Moved Permanently

302 Found

303 See Other

304 Not Modified

305 Use Proxy

307 Temporary Redirect

308 Permanent Redirect

400 Bad Request

401 Unauthorized

402 Payment Required

403 Forbidden

404 Not Found

405 Method Not Allowed

406 Not Acceptable

407 Proxy Authentication Required

408 Request Timeout

409 Conflict

410 Gone

411 Length Required

412 Precondition Failed

413 Payload Too Large

414 Request-URI Too Long

415 Unsupported Media Type

416 Requested Range Not Satisfiable

417 Expectation Failed

418 I’m A Teapot

421 Misdirected Request

422 Unprocessable Entity

423 Locked

424 Failed Dependency

426 Upgrade Required

428 Precondition Required

429 Too Many Requests

431 Request Header Fields Too Large

444 Connection Closed Without Response

451 Unavailable For Legal Reasons

499 Client Closed Request

500 Internal Server Error

501 Not Implemented

502 Bad Gateway

503 Service Unavailable

504 Gateway Timeout

505 HTTP Version Not Supported

506 Variant Also Negotiates

507 Insufficient Storage

508 Loop Detected

510 Not Extended

511 Network Authentication Required

599 Network Connect Timeout Error

See how Wetopi stacks up against your current hosting

Migrating sites to us is free and completely effortless on your part.

No hidden small text.
No commitments.
No credit card.

Try before you buy.