Jump to content

Understanding and Resolving the HTTP Error 503 Service Unavailable Error in IIS


Recommended Posts

Guest PradeepSharma
Posted

Symptom

 

Here’s a common scenario that many System Administrators, DevOps engineers, and Developers might encounter when users attempt to browse a site hosted on IIS, they receive an HTTP Error 503 Service Unavailable message as below.

 

 

 

[ATTACH type=full" alt="PradeepSharma_0-1724522676304.jpeg]63866[/ATTACH]

 

 

 

 

 

Initial phase : This is what users see on the page, but there are several ways an engineer can troubleshoot and address this issue. The "503 Service Unavailable" message typically appears when the application pool is in a stopped state. But why would an application pool be stopped, especially when it should be running to support website usage? Surprisingly, it’s IIS that stops it. Sounds strange? It might at first, but there’s a reason behind this. Let’s dive into why this happens.

 

 

 

Rapid Fail protection : So, what should we do about this? According to Microsoft documentation, the World Wide Web Publishing Service (W3SVC) is configured to take all applications in an application pool offline if the number of worker process crashes reaches the maximum defined by the RapidFailProtectionMaxCrashes property within the time frame specified by the RapidFailProtectionInterval property. By default, these settings are enabled, with a failure limit of 5 crashes within 5 minutes. If you’re encountering a 503 – Service Unavailable error and notice the Application Pool is stopped, the first step is to check the System event logs.

 

 

 

But why does IIS stop the application pool, and why is this configuration included in the Application Pool’s advanced settings?

 

 

 

The reason is that if the Windows Process Activation Service (WAS) continues to create processes for the application pool and they keep crashing, it becomes costly for the system to repeatedly spawn processes that fail. To prevent this, IIS stops the application pool, marking it as "Stopped" until an administrator reviews and addresses the underlying issue. Once the cause of the crashes is resolved, the administrator can manually restart the application pool.

 

 

 

 

 

Troubleshooting : Enough talk—let's dive into the action.

 

 

 

Event Logs : While reviewing the event logs, we noticed there were 5 warnings followed by an error originating from the Windows Process Activation Service (WAS).

 

 

 

[ATTACH type=full" alt="PradeepSharma_1-1724522676318.jpeg]63867[/ATTACH]

 

 

 

 

 

And here is the error:

 

 

 

[ATTACH type=full" alt="PradeepSharma_2-1724522676323.jpeg]63868[/ATTACH]

 

 

 

 

 

Take a closer look—it mentions “due to a series of failures,” which confirms that Rapid Fail Protection is kicking in. What's even more interesting is that each warning event shows a different process ID, even though we’re running only one worker (assuming the default configuration hasn’t been changed). This indicates that the application is crashing every time it attempts to perform an action.

 

 

 

Crash : Alright, so we can conclude that the application is crashing. Now, it's time to thoroughly review the event logs and check if any exceptions are recorded in the Application event logs. These logs should contain a call stack that developers can analyze further.

 

 

 

But what if the process is crashing due to something other than the code? That, too, depends on the details in the event logs. Often, if IIS causes the process to crash, it could be due to missing modules that are referenced in the ApplicationHost.config but are not available.

 

 

 

Putting one for example here.

 

 

 

Some required IIS components are NOT loading properly. e.g. (The Module DLL <path-to-DLL> failed to load. The data is the error.). This can happen when that feature is not installed properly on the server.

 

 

 

Sample error for reference.

 

  • The Module DLL C:\WINDOWS\System32\inetsrv\webdav.dll failed to load. The data is the error.

 

How to fix these type of the issues

 

 

 

Please check if system is referring failed to load DLL in "C:\Windows\System32\inetsrv\config\applicationHost.config" file. If yes, identify the associated Role/Service and install it on server. In this example "WebDAV Publishing" IIS Module. Let’s install this module by referring to below screen shot.

 

 

 

[ATTACH type=full" alt="PradeepSharma_3-1724522676325.jpeg]63869[/ATTACH]

 

 

 

 

 

Note: Depending on server configuration, there may be different DLLs causing this problem one by one. Other "failed to load DLL" errors for your reference.

 

 

 

  • The Module DLL C:\WINDOWS\System32\inetsrv\iiswsock.dll failed to load. The data is the error.
    • Solution: Please install Web Socket Protocol IIS Module

  • The Module DLL C:\WINDOWS\System32\inetsrv\warmup.dll failed to load. The data is the error.
    • Solution: Please install Application Initialization IIS Module

  • The Module DLL C:\WINDOWS\System32\inetsrv\logcust.dll failed to load. The data is the error.
    • Solution: Please install Custom Logging IIS Module

  • The Module DLL C:\WINDOWS\System32\inetsrv\authcert.dll failed to load. The data is the error.
    • Solution: Please install Client Certificate Mapping Authentication IIS Module

  • The Module DLL C:\WINDOWS\System32\inetsrv\webdav.dll failed to load. The data is the error.
    • Solution: Please install WebDAV Publishing IIS Module

 

Continue reading...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...