Running an ASP.Net Core application based on IdentityServer 4 on an AWS cluster, after 14-21 days all outgoing HTTPS requests take 5min or more to finish.
After an investigation found that the WinHTTP Web Proxy Auto-Discovery Service
dies with the following error: The endpoint mapper database entry could not be created.
not sure if this is the issue or a side effect of something else that breaks lower in the OS.
Environment:
- ELB with with an autoscaling group with two instances behind it, issue occurs on both
- Windows Server 2019
Notes:
- It is a custom AMI but the only difference with the instances that do not experience this is the product is running on it.
- Happens on both .Net core 2.2 and 3.1 based versions of the application
- Happens on both versions based on IdentityServer4 v2 and v3
- The app is deployed self contained
- The app uses Kestrel without a reverse proxy in front of it
Tried:
- Enabled schannel: no errors in the schannel logs set on trace
- No other notable errors in any of the EventViewer logs
- Restarting the instance fixes the problem
- When running curl.exe -v to an HTTPS site on the machine the request gets stuck on
schannel: checking server certificate revocation
- The clocks on the instances are OK
- Restarting the app process does not resolve the issue
- Disabling the
HTTPClient
in the code using theWinHTTP Web Proxy Auto-Discovery Service
service still breaks the service.