As explained in What possibilities can cause "Service Unavailable 503" error? and TechNet: 503-Service Unavailable (IIS 6.0), there are many possible reasons for a 503 error.
In your case it is the "rapid-fail protection" of IIS kicking in. Your application crashes your worker process, and that occurs so many times in a short timespan, that the server assumes something is inherently wrong with your application and shuts the application pool down.
Do note that an application error (such as an exception occurring for an unavailable database) should not kill the worker process. If this happens a lot, there's something else that's very wrong. Check the event log to find out the actual source of the error and fix that.
In the meantime, you may be able to prevent the crashes by adding try-catch
statements at the appropriate places, or by adding a global exception handler in Application_Error
.