Intermittent 503 Errors on ASP.NET Website Despite Running App Pool – What’s Happening?

muhammad talha 0 Reputation points
2025-12-07T19:23:06.2+00:00

I’m working on a website hosted on IIS, and I’ve noticed that when I deploy my ASP.NET application, some users intermittently receive a 503 Service Unavailable error. In contrast, the website appears to be functioning properly for others. The application pool is running, and there are no obvious server resource issues. What subtle IIS or .NET configuration issues could cause this kind of intermittent behavior, and how can I reliably diagnose the root cause?

Developer technologies | ASP.NET | ASP.NET Core
{count} votes

2 answers

Sort by: Most helpful
  1. Q&A Assist
    2025-12-07T19:23:18.2533333+00:00
    AI generated content. This question contains an answer created with AI from Q&A Assist. Learn more

    Intermittent 503 errors on an ASP.NET website can be caused by several subtle issues, even when the application pool is running. Here are some potential causes and diagnostic steps you can take:

    1. Application Pool State: Ensure that the application pool is not being recycled frequently or is in a stopped state. You can check the event logs for any entries that indicate why the application pool might be stopping.
    2. Concurrent Request Limit: If the appConcurrentRequestLimit property is set too low, it may lead to 503 errors when the number of concurrent requests exceeds this limit. Check your IIS settings to ensure this value is appropriate for your application's traffic.
    3. ASP.NET Queue Full: If the ASP.NET queue is full, it can cause 503 errors. Monitor the application to see if there are spikes in traffic that might lead to this issue.
    4. FastCGI Queue Full: Similar to the ASP.NET queue, if you are using FastCGI, ensure that its queue is not full, as this can also lead to 503 errors.
    5. Debugging Logs: Enable ASP.NET Core Module debug logging by modifying your web.config file. This can provide insights into what might be going wrong when users encounter the 503 error. Ensure the path for the log exists and the application pool identity has write permissions.
    6. HTTP.sys Logs: Check the HTTP.sys logs located in D:\Windows\System32\LogFiles\HTTPERR. If you see entries related to 503 errors, it indicates that the requests are being rejected at the HTTP.sys level before reaching IIS.
    7. Substatus Codes: Look at the substatus codes in the IIS logs. They can provide more specific information about the cause of the 503 error. For example, a substatus code of 503.0 indicates that the application pool is unavailable.

    By following these steps, you should be able to diagnose the root cause of the intermittent 503 errors on your ASP.NET website.


    References:

    0 comments No comments

  2. Tom Tran (WICLOUD CORPORATION) 3,135 Reputation points Microsoft External Staff Moderator
    2025-12-08T07:14:28.21+00:00

    Hi @muhammad talha , Thanks for the details!

    The error 503 Service Unavailable usually means IIS is rejecting requests before your app code runs. Here are some common causes I could find:

    • Rapid-Fail Protection: If the worker process crashes several times quickly, IIS temporarily stops the pool. You can check for more details here.
    • Queue Overflow: IIS or ASP.NET request queues can fill up during traffic spikes. When the queue hits its limit, IIS returns 503 immediately. See Request Queue Behavior.
    • Recycle Timing: During app pool recycling, there’s a short window where requests fail. For ASP.NET Core, overlapped recycle can cause transient 503s. For more info: ANCM Recycling Issues.
    • Identity Problems: If the app pool account password expires or loses permissions, the worker process can crash intermittently. There is a discussion about this here.

    How to reliably diagnose the root cause?

    IIS has a built-in logging system. You can do it through Configure Logging in IIS and Failed Request Tracing or you can check here for more options and details.

    I also managed to find discussions about this issue, even though they are quite old but I think they are still useful. Perhaps you can check them out when you have the time:

    Disclaimer: Some of these are non-Microsoft websites. The pages appear to be providing accurate, safe information. Watch out for ads on the site that may advertise products frequently classifies as a PUP (Potentially Unwanted Products). Thoroughly research any product advertised on the site before you decide to download and install it.


    I hope these suggestions are useful to you! If you have any questions, please feel free to reach out. I'll be happy to assist!

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.