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:
- 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.
- Concurrent Request Limit: If the
appConcurrentRequestLimitproperty 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. - 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.
- 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.
- Debugging Logs: Enable ASP.NET Core Module debug logging by modifying your
web.configfile. 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. - 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. - 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: