Kris
Kris

Reputation: 101

How do we debug a "This service is unavailable" error message for our website?

We've recently had an issue where our application/website was displaying "The service is unavailable" message to users. Please note it wasn't the typical message where it displays the 503 error code that IIS typically generates...the only text on the page was "The service is unavailable" (it did not show any error codes or any additional text).

We stopped the application pool and started it back up, and the site began to work again. It was down for approximately 15 minutes.

We've gone through all of the log files and interestingly enough there was some traffic going to the server during the 15 minutes we were seeing the "The services is unavailable" message, without any 503 attempts being logged, no windows event errors, etc.

Does anyone have any ideas how to isolate the issue or find a log file that would display what happened?

Upvotes: 2

Views: 554

Answers (1)

llessurt
llessurt

Reputation: 636

I have observed similar messages and found that the actual response status code was displayed in the browser console log. (For Chrome-based browsers, right click on the page and select "Inspect" -- look at the Console tab.)

If this is an .NET Core application hosted in IIS, I might also guess at the problem. The problem may be that IISNativeApplication is instantiated in a way that allows it to be disposed when running in IIS. This results in the application pool reporting that the application is running, but it will not serve pages nor generate any exceptions.

Look at the application code to resolve. The methods listed below initiate IISNativeApplication. Make sure that you are calling only one of the methods, and only calling it once anywhere in the application:

  1. WebApplication.CreateBuilder (often the first line of Program.cs)
  2. ConfigureWebHostDefaults
  3. WebHost.CreateDefaultBuilder
  4. Explicit calls to UseIIS

Find more information here: IIS Support Blog

Upvotes: 0

Related Questions