Why do I see a “503 Service Unavailable” error?
If you see a “503 Service Unavailable” error message on your Web site, it means that the site has reached the limit on how many simultaneous “requests” it can handle from you.
On this page:
- What causes a 503 error?
- How can I tell if it’s just me?
- What if I want to allow more (or less) scripts per IP address?
- What are some common causes of 503 errors on WordPress sites?
What causes a 503 error?
There are two important things to keep in mind about 503 errors:
- It’s probably only limiting the simultaneous requests from your computer’s IP address at 18.104.22.168. Other visitors to the site are probably not seeing the same error.
- The cause of the 503 error is not the page request you made when the error appeared. The problem happened because a previous page request hasn’t yet finished, and there isn’t “room” for you to start running a new script on the site yet.
We sometimes hear reports of 503 errors because a WordPress site owner starts running a server script that takes a long time, then opens a new browser tab and starts trying to do other things while the first thing is still going. But there’s a limit to how many things each connected IP address can do at once on a site — and that limit is useful, because it prevents the site owner (or anyone else) from using up so many script “slots” that other visitors can’t run scripts themselves.
If you see a 503 error on your own site and you’re wondering what’s wrong, don’t focus on the last thing you clicked on. Think back to what other things you tried doing on your site in the last few minutes that may not have finished yet. Those are the cause of the problem.
When you’ve identified what the cause is, you can either try to fix your script (if it shouldn’t be that slow), or just let it finish before you try doing other things (if it’s reasonable for it to be that slow).
In either case, other people probably aren’t seeing the same thing — your site’s probably not totally “down” — and it will almost certainly clear up if you leave things alone for a few minutes (because the already-running scripts will finish).
How can I tell if it’s just me?
We mentioned above that it’s probably only your computer being affected by this, but in rare cases, there can be a more general problem with your site or the server it’s on.
You can tell the difference by using a third-party test like CheckSite.us or Is My Blog Working?, which try to load your site from different computers. If these say things are working, but your own attempts to access it from your computer show 503 error messages, it’s just you. Waiting a few minutes will give you a fresh start.
What if I want to allow more (or less) scripts per IP address?
If you intentionally want to remove the limit on how many scripts each connected IP address can run simultaneously, you can do it by adding a line like this to your Web site’s top-level .htaccess file:
SetEnv tigertech-limit-fastcgi-by-ip 0
Doing this will allow any connecting IP address to use all the available slots (the “0” means “no limit”), up to the total limits mentioned on our server resources page.
Although it’s a little more complicated, it’s usually better to remove the limit only for certain IP addresses. This would remove the limit for any IP address beginning with "192.0.2.", for example:
SetEnvIf Remote_Addr ^192\.0\.2\. tigertech-limit-fastcgi-by-ip=0
Similarly, you could do the same kind of thing to restrict certain IP addresses to a single slot by changing the “0” to “1”:
SetEnvIf Remote_Addr ^192\.0\.2\. tigertech-limit-fastcgi-by-ip=1
Or you could limit certain connecting browser User-Agents to a single slot:
SetEnvIfNoCase User-Agent evilbot tigertech-limit-fastcgi-by-ip=1
(The Apache Web server mod_setenvif documentation explains more about setting these kinds of variables.)
Note that we don't recommend doing this, either. If you think you need to do this, your site almost certainly has an underlying, different, problem that needs fixing: scripts run from your IP address aren't finishing fast enough because there's something wrong with them. It’s better to fix that.
What are some common causes of 503 errors on WordPress sites?
As a tip, here are a some of the causes of 503 errors we see repeatedly with WordPress:
- The WP-DBManager plugin causes problems when set to automatically “optimize” a large database periodically. Doing so locks the database tables for seconds or minutes on end, preventing scripts from accessing it.
- The Google XML Sitemaps plugin causes problems with large numbers of posts if you use any of the “Excluded Items” options. (It’s usually okay if you don’t use any “Excluded Items” or if you have fewer than a couple of hundred posts.)
- You’ll have problems if you use a plugin that attempts to contact an external server that is sometimes “down”, if the plugin doesn’t limit how long it waits for the external server.