Diagnosing and Fixing a 503 HTTP Error
The first step to having a successful website is making sure that it works. Server errors leave a bad taste in visitors' mouths, which could cause them to turn away and never return. Websites with frequent errors are sometimes punished by search engines, which makes reaching new clients even more difficult. Downtime is sometimes unavoidable, but it should nonetheless be avoided as much as possible. Fortunately, error codes give visitors and administrators some idea of what the problem might be.
This guide will explain the potential causes of 503 HTTP errors and how to address them.
What Is a 503 HTTP error?
Visitors see a 503 HTTP error when the server is unable to deliver the resources requested. The 503 status code indicates that the site is still functional, but it's temporarily unavailable. It basically tells guests that you are "closed for repairs." There are three typical causes:
- Server Maintenance - Visitors will see a 503 HTTP error message if the site is offline for routine updates.
- Server Overload - If the site is receiving more traffic than the server can handle, some users might be met by a 503 HTTP error. The server can also become overloaded if the website's content has outgrown its resources, in which case it's time for updates. Malware, spam attacks or incorrect programming can cause 503 HTTP errors as well.
- Client Side Issues - Occasionally, visitors may get this error if their client side DNS server goes down or is improperly configured.
Furthermore, 503 errors can sometimes only occur in certain locations. This issue may be variable and happen when your server is on the edge of overloading and therefore some locations will receive a 503 while others may receive a 200. Check out the image below which demonstrates this with our performance test tool.
How to Fix a 503 HTTP error
If you come across a 503 error on your site then there are a few things you can check. To prevent and fix unplanned downtime, follow these tips:
- Mind Your Hosting Resources - Too much traffic can trigger problems if you're not ready for it. Of course, you want as many people as possible to see your website, so you should keep an eye on your resources to make sure you're always prepared for a sudden influx of visitors. During times when you expect to see a surge in traffic, such as when you're running a special promotion or during the holidays if you have an online store, you might want to consider an increase in your server capacity. Use a content delivery network to help mitigate the traffic increase and check out our 8 tips for running high traffic sites.
- Update Your Software - Cybercrime is on the rise, and outdated applications can provide openings for hackers to exploit. If you suspect that malicious software could be causing 503 errors, contact your hosting provider right away. You may need to upgrade your server package or install updates.
- Look for Programming Errors - Poor programming can choke your server and lead to errors. WordPress websites are particularly prone to 503 errors resulting from long load times. Too many database access attempts can cause this problem. Some plugins designed to expand functionality can also bring your website to a halt. If you have a lot of extensions installed, reevaluate their utility to determine if deactivating any of them would provide a net benefit to your visitors.
Variations of the 503 HTTP error
A 503 HTTP error may be accompanied by a message such as "service unavailable" or "connection failed." Depending on the client's OS, visitors may see errors like HTTP_STATUS_SERVICE_UNAVAIL or WU_E_PT_HTTP_STATUS_SERVICE_UNAVAIL, which are essentially the same as a 503 HTTP error. If the requested website is running Microsoft's IIS web server software, visitors may see even more specific messages such as:
- 503.0 application pool unavailable
- 503.2 concurrent request limit exceeded
- 503.3 ASP.NET queue full
Such variations can provide additional insight to help with troubleshooting, but they can all be fixed following the suggestions described above.
Customized Error Pages
If you need to take your server offline for maintenance, you can and should customize your error pages to let visitors know why your website is down and when they should expect it to be back up and running. Creating custom error pages that match the design of your website can go a long way in helping you retain visitors. Media Temple has a tutorial on making custom error pages.