Processing HTTP Error 503 Service Unavailable With HTTP Debugger

The error 503 usually means that the Web server is currently unable to handle the HTTP requests. Most of the time this is because the server is too busy or it is down for maintenance.

Microsoft IIS servers provide more specific information about 503 errors by adding an additional number to the error code.

The Retry-After response-header field can be used with a 503 (Service Unavailable) response to indicate how long the service is expected to be unavailable to the requesting client. In the first example the client needs to to retry request after an exact time, while in the second example, the client needs to retry request after two minutes.

Retry-After: Mon, 11 Aug 2014 12:00:00 GMT
Retry-After: 120

If you are writing your own web application in PHP, you can respond with 503 status code with the following code:

$protocol = "HTTP/1.1";
header( "$protocol 503 Service Unavailable", true, 503 );
header( "Retry-After: 120" );

HTTP 503 error codes and Google

If you send an HTTP error 503 code for your robots.txt, Google will halt all the crawling on your domain until it's allowed to crawl the robots.txt again.
This is actually a very useful way of preventing load on your server when doing maintenance. It still requires you to send a 503 for every URL on your server, including all static ones, but after Google has re-fetched the robots.txt it’ll probably stop hammering your server(s) for a while.

Analyzing HTTP 503 status code with HTTP Debugger

HTTP Debugger automatically detects and highlights red the 503 status codes. The error details are aviable in the response details pane.



Download HTTP Debugger



Copyright Notice: No part of this article may be reproduced, translated, stored in a retrieval system, or transmitted in any form or by any means without prior written permission from the HTTPDebugger.com

Read more articles    |    Send your feedback about this article