Blog @ gafvert.info

You cannot have a customized "Server Busy" error page

In IIS you can limit the number of connections allowed to a specific website. This is done from the Performance tab in the website properties. When the number of allowed connections is reached, IIS returns a 503 status code (Service Unavailable). The text logged in HTTP.sys error log is ConnLimit.

The 503 error (along with a few other status codes) cannot be customized because they are handled in the kernel mode by HTTP.sys. This means that user-mode routines, such as CustomError cannot be run.

In versions prior to IIS 6.0, 403.9 was the status code returned by IIS when the connection limit was reached. This error could in previous versions of IIS be customized. According to Configuring Custom Error Messages this error cannot be customized in IIS 6.0, and it would also have no effect to the page returned when the connection limit is reached, because another status code is returned to the client.

I have been asked why 403.9 is not still returned. I can of course not say what Microsoft's reason was, but in my opinion the 503 status code is more appropriate to return in this situation. According to the HTTP 1.1 RFC (2616), when the server responds with a 403 status code, "the request should not be repeated". This is not what we want (although we want the client to wait for a little while before repeating the request, so a connection to another client can be closed). Instead the description for the 503 status code is more suitable to this situation:

The server is currently unable to handle the request due to a temporary overloading or maintenance of the server. The implication is that this is a temporary condition which will be alleviated after some delay.

This is probably why 503 is now returned instead of 403.9 as in previous versions of IIS.

"Status code" and "error" has been used interchangeable in this article. RFC 2616 denotes it as "status codes" because it is a code returned by the web server to indicate a status. In some extent (depending on the number), it is also an error (to the user). For easy understanding of this article, I have used "status code" when appropriate, and "error" when appropriate.

Published 2007-01-02 21:00 GMT+0100 by Kristofer Gafvert