You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
IIS Application Pool Recycle returns unexpected 503 #10117
affected-fewThis issue impacts only small number of customersarea-networkingIncludes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractionsenhancementThis issue represents an ask for new feature or an enhancement to an existing oneseverity-minorThis label is used by an internal tool
I have a Asp.Net Full Framework MVC Application (Visual Studio default MVC Template) hosted on my local IIS10 (Win10) (not IIS Express) with "Disable Overlapped Recyle = false" (default value).
If i recycle the application pool while i use a tool to continuously send http requests the webserver will respond correctly for all requests, no Errors (500 / 503) and no timeouts.
If i try to do the same with Asp.Net Core 2.2 (InProcess) i will get 503 exceptions.
I have the same Problem if i change the physical path for my website.
Full Framework no 503, AspNetCoreModuleV2 a lot of 503.
The old "AspNetCoreModule" (Asp.Net Core 2.1) had a similar Problem but had returned less 503 responses.
Expected behavior
The Expected behavior would be:
no 503 errors on recycle (with "Disable Overlapped Recyle = false")
no 503 responses if the physical path changes.
This is important for high availability and depoyment in my case.
Screenshots
Full Framework 4.7.2 with overlapped recycling not hosted via AspNetCoreModule
(left Baseline, right recycle test)
AspNetCore 2.2 with overlapped recycling via AspNetCoreModuleV2
(left Baseline, right recycle test)
Reacted by Iman Peeman, Shaun Bowe, Zack Carlson, Eric, Peter Sandtner, Maroš Pištej, Pavol Madar, Patrik Holčák, Martin Bórik, Juraj Duris and 23 more
@rockerinthelocker the 'Queue Length' for my tests was 1000 (default) but in both cases, .net full and core. I've made one more test with Queue Length = 65000 but nothing has changed, neary the same count of request errors.
One more thing i've noticed is, the difference in Max Request time, this could explain the problem, or maybe give us a hint...
.net full framework
if i hit recycle the already started requests will be processed.
the new worker process will be started (overlapped)
the new incomming requests will be queued
if the new process is ready they will be processed there without errors
result: some requests with long request time (long wait time in queue)
.net core
if i hit recycle the already started requests will be processed.
the new worker process will be started (overlapped)
the new incomming requests will be queued OR still processed by the old worker but return 503 while in shutdown phase
if the new process is ready they the queued requests will be processed by the new worker but this happens to early, process is not ready to process requests and return 503
result: in both cases we get some 503 but we get less long response time (less time in queue)
Of course this is only a possible explaination, no concrete result of debugging!
We'll do some looking at if we can improve this. However, in general we recommend using a pattern like blue-green deployments for zero-downtime deployments. Features like Overlapped Recycle help, but don't guarantee that you can do a zero-downtime deployment.
It's ok if it doesn't guarantee zero downtime for deployment, but it would be nice if it would work like the old .NET, but you're right there will be no guarantee.
But i think it should be guaranteed zero downtime for application pool recycle (by time interval, by memory limitation, manual recycle via IIS UI) right?
But i think it should be guaranteed zero downtime for application pool recycle (by time interval, by memory limitation, manual recycle via IIS UI) right?
Nothing is guaranteed when it comes to downtime, that's what makes high-availability applications so tricky :). But my understanding is that yes we can try to make this better. In the situation where the app pool is recycling, IIS should be emitting the appropriate events to ensure we keep downtime low.
We'll look in to this if we can in 3.0, but we have a lot of high-priority work, so I can't guarantee how far we'll get.
Moving to the Backlog. We've done some initial investigation and this is going to be very challenging. For high-availability scenarios we need this and some kind of shadow copying mechanic which is a very costly feature. We might be able to revisit later. Using separate app pools and a load balancer is our recommended approach for high-availability as it allows you full flexibility over deployment process and the ability to easily revert versions.
@anurse thanks for the investigation. I agree with your conclusions about high-availability scenarios and deployment.
But for me the more important case is the normal periodical application pool recycle.
Correct me if i'm wrong, but for this case no shadow copying would be neccessary because nothing changes in the web folder.
it seems like there are requests still processed by the worker process in shutdown phase and not queued in IIS request queue for the new worker process. This issue is probably different from the shadow copy problem during a deployment, and it happen much more often (every 27 hours with default config)
Reacted by Matt Benschop, James Troutman, Ross Presser, Peter Andersson, MattNorgren, gschuermans, Bart Dekker, Eric and Alexander Yumashev
So, given this issue and #8775, is there a way to have zero-downtime application pools recycles and deployments with IIS-only tools, or we should use other tools? We're facing the exact same issue.
@ferrarimartin FYI: for our company we have decided to go on with .net 4.x full framework to provide this zero-downtime services.
we where not able to work around this issue for application pool recycle. for Publishing we used some kind of "blue green deployment strategy" but for periodical recycle we where not able to find a workaround
It's not just asp.net core. Overlapped recycling in IIS appears to be completely broken. No kidding. Windows Server 2019, AWS, docker, .NET Framework 4.7.2 Web Application. "Application Initialization" Windows feature confirmed to be installed: Get-WindowsFeature 'Web-AppInit' shows Install State = Installed.
With Powershell, I make absolutely sure my runtime settings within the docker container are configured for overlapped recycling. I made sure: 1. idle timeout is set to zero, 2. the startup time limit is high enough (even the shutdown time limit is more than enough), 3. periodic restart is disabled (set to zero) and instead 4. a scheduled restart time is configured (in the near future, for testing behavior), 5. ensured 'preloadEnabled' is set to true, and 6. the 'old' methods of using auto start provider are disabled by setting serviceAutoStartEnabled = False and serviceAutoStartProvider = "" (btw, having them enabled does not fix anything), and made sure they're set explicitly at the web application level, in addition to the site-level defaults.
Not only am I seeing double-runs of Application_Start (in global.asax) where only one of the calls finishes (the other shows no indication of completing before being terminated), I see basically immediate blocking of all requests. It's limited to a single server node and processModel.maxProcesses is set to 1.
In a scenario with 4 threads constantly calling the app node when a recycle event occurs, all 4 requests block right away. 2 of the 4 experience a 504, gateway timeout after 60s, retry, and complete in 30s (so 90s total). The other 2 threads' calls (which started at the same time), complete after about 90s (about 10s more than the 80s runtime measured by Application_Start. So... the overall wait time of all 4 threads is 90s, but 2/4 experience a 504 after 60 seconds, and the other two experience no such disruption, completely cleanly after a 90s blocking wait. Not even sure where the 60s timeout leading to the 504s is coming from, since process model shutdown/startup time limits are 1:30 and 5:00 respectively. No timeout settings that I'm aware of are at 60s.
Somehow it's like there are 2 processes started (confirmed by logging output by Application_Start), half the requests (2 or 4) end up at one that ultimately gets terminated (confirmed by absence of logs written at end of Application_Start), and the other two are sent to the 'good' one that eventually persists (and writes logs at end of Application_Start). It makes no sense. On top of that, the 'initializationPage' I have set is never called. Path is correctly set to '/MyWebApp/health/warmup', and I confirmed I can reach it from within docker via calling a similarly-placed echo endpoint like: $body = @{"status_code"=200;"payload"="abc"}; Invoke-WebRequest 'http://localhost:80/MyWebApp/health/echo' -Method 'POST' -Body ($body|ConvertTo-Json) -ContentType 'application/json' -UseBasicParsing;
It's like overlapped recycling just DOES NOT WORK AT ALL. The moment the new process starts, requests are immediately routed to it (or a bad copy of a duplicate new process) and block until it's completely warmed up. That's not overlapping.
I've tested this behavior on settings change (process model changes are most disruptive, get 500s, 502, 503s, and 504s; app pool settings changes show duplicate initialization, as do scheduled recycling events; meanwhile, app-level changes don't seem to exhibit the duplicate initialization behavior, but the blocking behavior is still there; no overlapped recycling is apparent. There's just nothing about this setup that works as documented, and it's very frustrating that this is heavily impacting production environments.
@triynko although I completely understand what you're trying to achieve and share your pain there is only one potential real bug of IIS I see described in your post:
2 of the 4 experience a 504, gateway timeout after 60s
To me this looks like some sort of miscommunication between overlapped recycling and preloading (or autoStart, or AlwaysRunning, idk).
Speaking about overlapping. IIS does provide it to some extent by letting the requests which have already started finish in the old process and directing all new requests to a fresh process. This is what IIS means by "overlapping" - instead of blocking/503ing all new incoming requests, then waiting for all the existing requests to finish, and only then creating a new process and delegating all new requests there - it instantly creates a new process which overlaps with another existing process. This feature (or, more accurately, the ability to disable it) does make sense since there are applications which do not work properly with multiple process instances - yes, in many cases this is caused by smelly application design - but not always.
And IIS has no way to understand whether your application has or hasn't completely "warmed up". In modern DI/LazyLoading-driven applications the warm-up stage may even never complete since some resources would only get initialized during specific requests which may simply never happen for the whole process lifetime. Attempts to build a universal warmup-finished-detection technique would most likely either just fail, or would be ugly/buggy, or would require customizations within applications themselves (providing externally usable warmup methods). It is too individual.
P.S. All I've written about overlapped recycling is about .NET Framework apps, not ASP.NET Core. The latter does have a problem and we even had to completely disable scheduled recycling of ASP.NET Core applications to prevent regular 500 errors on frontends due to backends responding 503 during recycles.
Update since my last post. This is way more complex than I originally thought it would be. The overlapped recycling does work like it's supposed to, but there is a very specific issue that causes double or even triple initialization runs.
First, on the topic of detecting when an app has warmed up:
And IIS has no way to understand whether your application has or hasn't completely "warmed up". In modern DI/LazyLoading-driven applications the warm-up stage may even never complete since some resources would only get initialized during specific requests which may simply never happen for the whole process lifetime. Attempts to build a universal warmup-finished-detection technique would most likely either just fail, or would be ugly/buggy, or would require customizations within applications themselves (providing externally usable warmup methods). It is too individual.
It actually can and does detect when it's warmed up correctly. For example, preloadEnabled sends an initial request, which returns only after Application_Start has completed. Asynchronous warmups aside, as long as it waits for Application_Start to complete, it's fine. That means the app is able to serve requests. We do all our initialization in Application_Start and increase the startup/ping timeouts to allow it enough time to complete. In addition, IIS supports 'warmup' pages, and I've confirmed this works correctly too. During overlapped recycling, it not only finishes Application_Start, it also finishes executing the warmup pages before it starts handing requests to the new/overlapped process. The result is a completely undisrupted call chain with a sudden transition to the new process serving requests. The returned responses also confirm the value of my 'WarmedUp' flag set in the response header (sourced from a static variable assigned in my warmup endpoint), with no delayed requests at all.
Now, here's where things get interesting.
Microsoft's docker entrypoint executable ServiceMonitor, is what's coming in and disrupting everything. Because our apps are set to use autoStart and preloadEnabled, there's this docker-container-system-initiated run of the w3svc service that starts up the app pool and application right away, before ServiceMonitor even gets involved. That run is DOOMED and pointless. It's missing ENV variables that ServiceMonitor will eventually inject and so on. So the first thing ServiceMonitor does is try to stop the service, then inject environment variables in the DefaultAppPool's config section, then restart the service. So, to work around that doomed run, we simply set the startupMode of the w3svc service to 'Manual' (via Powershell script) when we build the docker container. That way, it's not initially running, there is no doomed run, and ServiceMonitor starts up, configures what it needs to, starts w3svc (for the first time) on it's own, then we see just a single run of application start! 😄
Except in ECS. We were seeing triple, not double, app startup runs there. So while we were able to reduce from 2 extra startups to 1 extra startup, we have no idea why this extra startup run is being triggered. It's something unique to the ECS environment that doesn't happen when running the image locally in docker desktop. The other strange thing about it is that it's an in-process recycle -- the kind you'd see if you modified a web.config file, and unlike the new-process, overlapped recycle that would happen if you modified some application pool setting. This in-process recycle is particularly bad for us, because it can crash the process when we're using SignalFx tracing libraries that hook into the CLR; we get sharing violations when it tries to load the domain-neutral assemblies inside the same process under a different AppDomain. Therefore, the only valid recycling we can support is new-process / overlapped recycling, such as scheduled recycling, and that's all we really want to support anyway.
Another strange thing is if dump all environment variables in Application_Start to disk (i.e. via Environment.GetEnvironmentVariables), the first Application_Start run is missing 2 variables that the 2nd one has. So... same process, but new run of Application_Start, and it lists out APP_POOL_CONFIG and APP_POOL_ID variables. And then, if I manually trigger a recycle with Powershell's Restart-WebAppPool DefaultAppPool, the new process is missing those two variables just like the original one was. So there's this very inconsistent behavior in docker and across recycles, particularly in ECS-deployed apps that's really, really bothering me. This double/triple recycling and triple cache-hydration is even leading to OutOfMemory exceptions on these already-memory-constrained systems (but that's another subject to be dealt with separately).
Agreed Experiencing this issue currently and there doesn't even seem to be a known workaround. Maybe @HaoK can comment on what's been decided to be done for this issue, or if there is a viable workaround for this issue?
ghost locked as resolved and limited conversation to collaborators on May 26, 2022
affected-fewThis issue impacts only small number of customersarea-networkingIncludes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractionsenhancementThis issue represents an ask for new feature or an enhancement to an existing oneseverity-minorThis label is used by an internal tool
Activity
rockerinthelocker commentedon May 9, 2019
Maybe the application pool's 'Queue Length' is too small? Default is 1,000 and if exhausted, 503ers are returned.
FlorianRainer commentedon May 10, 2019
@rockerinthelocker the 'Queue Length' for my tests was 1000 (default) but in both cases, .net full and core. I've made one more test with Queue Length = 65000 but nothing has changed, neary the same count of request errors.

One more thing i've noticed is, the difference in Max Request time, this could explain the problem, or maybe give us a hint...
.net full framework
if i hit recycle the already started requests will be processed.
the new worker process will be started (overlapped)
the new incomming requests will be queued
if the new process is ready they will be processed there without errors
result: some requests with long request time (long wait time in queue)
.net core
if i hit recycle the already started requests will be processed.
the new worker process will be started (overlapped)
the new incomming requests will be queued OR still processed by the old worker but return 503 while in shutdown phase
if the new process is ready they the queued requests will be processed by the new worker but this happens to early, process is not ready to process requests and return 503
result: in both cases we get some 503 but we get less long response time (less time in queue)
Of course this is only a possible explaination, no concrete result of debugging!
analogrelay commentedon May 14, 2019
We'll do some looking at if we can improve this. However, in general we recommend using a pattern like blue-green deployments for zero-downtime deployments. Features like Overlapped Recycle help, but don't guarantee that you can do a zero-downtime deployment.
FlorianRainer commentedon May 15, 2019
@anurse Thanks for taking a look at this.
It's ok if it doesn't guarantee zero downtime for deployment, but it would be nice if it would work like the old .NET, but you're right there will be no guarantee.
But i think it should be guaranteed zero downtime for application pool recycle (by time interval, by memory limitation, manual recycle via IIS UI) right?
analogrelay commentedon May 15, 2019
Nothing is guaranteed when it comes to downtime, that's what makes high-availability applications so tricky :). But my understanding is that yes we can try to make this better. In the situation where the app pool is recycling, IIS should be emitting the appropriate events to ensure we keep downtime low.
We'll look in to this if we can in 3.0, but we have a lot of high-priority work, so I can't guarantee how far we'll get.
analogrelay commentedon Jun 4, 2019
Moving to the Backlog. We've done some initial investigation and this is going to be very challenging. For high-availability scenarios we need this and some kind of shadow copying mechanic which is a very costly feature. We might be able to revisit later. Using separate app pools and a load balancer is our recommended approach for high-availability as it allows you full flexibility over deployment process and the ability to easily revert versions.
FlorianRainer commentedon Jun 5, 2019
@anurse thanks for the investigation. I agree with your conclusions about high-availability scenarios and deployment.
But for me the more important case is the normal periodical application pool recycle.
Correct me if i'm wrong, but for this case no shadow copying would be neccessary because nothing changes in the web folder.
During the recycle process the IIS returns
IIS 10.0 detailed error - 503.0 - Service Unavailabe, this could be caused by https://github.com/aspnet/AspNetCore/blob/3477daf3c4f530dff80f197e0642cb39a26fb07b/src/Servers/IIS/AspNetCoreModuleV2/AspNetCore/proxymodule.cpp#L121ERROR_SERVER_SHUTDOWN_IN_PROGRESSbut i'm not sure about this.it seems like there are requests still processed by the worker process in shutdown phase and not queued in IIS request queue for the new worker process. This issue is probably different from the shadow copy problem during a deployment, and it happen much more often (every 27 hours with default config)
ferrarimartin commentedon Jul 23, 2020
So, given this issue and #8775, is there a way to have zero-downtime application pools recycles and deployments with IIS-only tools, or we should use other tools? We're facing the exact same issue.
FlorianRainer commentedon Jul 30, 2020
@ferrarimartin FYI: for our company we have decided to go on with .net 4.x full framework to provide this zero-downtime services.
we where not able to work around this issue for application pool recycle. for Publishing we used some kind of "blue green deployment strategy" but for periodical recycle we where not able to find a workaround
21 remaining items
triynko commentedon Jan 11, 2022
It's not just asp.net core. Overlapped recycling in IIS appears to be completely broken. No kidding. Windows Server 2019, AWS, docker, .NET Framework 4.7.2 Web Application. "Application Initialization" Windows feature confirmed to be installed:
Get-WindowsFeature 'Web-AppInit'showsInstall State = Installed.With Powershell, I make absolutely sure my runtime settings within the docker container are configured for overlapped recycling. I made sure: 1. idle timeout is set to zero, 2. the startup time limit is high enough (even the shutdown time limit is more than enough), 3. periodic restart is disabled (set to zero) and instead 4. a scheduled restart time is configured (in the near future, for testing behavior), 5. ensured 'preloadEnabled' is set to true, and 6. the 'old' methods of using auto start provider are disabled by setting serviceAutoStartEnabled = False and serviceAutoStartProvider = "" (btw, having them enabled does not fix anything), and made sure they're set explicitly at the web application level, in addition to the site-level defaults.
Not only am I seeing double-runs of Application_Start (in global.asax) where only one of the calls finishes (the other shows no indication of completing before being terminated), I see basically immediate blocking of all requests. It's limited to a single server node and processModel.maxProcesses is set to 1.
In a scenario with 4 threads constantly calling the app node when a recycle event occurs, all 4 requests block right away. 2 of the 4 experience a 504, gateway timeout after 60s, retry, and complete in 30s (so 90s total). The other 2 threads' calls (which started at the same time), complete after about 90s (about 10s more than the 80s runtime measured by Application_Start. So... the overall wait time of all 4 threads is 90s, but 2/4 experience a 504 after 60 seconds, and the other two experience no such disruption, completely cleanly after a 90s blocking wait. Not even sure where the 60s timeout leading to the 504s is coming from, since process model shutdown/startup time limits are 1:30 and 5:00 respectively. No timeout settings that I'm aware of are at 60s.
Somehow it's like there are 2 processes started (confirmed by logging output by Application_Start), half the requests (2 or 4) end up at one that ultimately gets terminated (confirmed by absence of logs written at end of Application_Start), and the other two are sent to the 'good' one that eventually persists (and writes logs at end of Application_Start). It makes no sense. On top of that, the 'initializationPage' I have set is never called. Path is correctly set to '/MyWebApp/health/warmup', and I confirmed I can reach it from within docker via calling a similarly-placed echo endpoint like:
$body = @{"status_code"=200;"payload"="abc"}; Invoke-WebRequest 'http://localhost:80/MyWebApp/health/echo' -Method 'POST' -Body ($body|ConvertTo-Json) -ContentType 'application/json' -UseBasicParsing;It's like overlapped recycling just DOES NOT WORK AT ALL. The moment the new process starts, requests are immediately routed to it (or a bad copy of a duplicate new process) and block until it's completely warmed up. That's not overlapping.
I've tested this behavior on settings change (process model changes are most disruptive, get 500s, 502, 503s, and 504s; app pool settings changes show duplicate initialization, as do scheduled recycling events; meanwhile, app-level changes don't seem to exhibit the duplicate initialization behavior, but the blocking behavior is still there; no overlapped recycling is apparent. There's just nothing about this setup that works as documented, and it's very frustrating that this is heavily impacting production environments.
sbakharev commentedon Jan 13, 2022
@triynko although I completely understand what you're trying to achieve and share your pain there is only one potential real bug of IIS I see described in your post:
To me this looks like some sort of miscommunication between overlapped recycling and preloading (or autoStart, or AlwaysRunning, idk).
Speaking about overlapping. IIS does provide it to some extent by letting the requests which have already started finish in the old process and directing all new requests to a fresh process. This is what IIS means by "overlapping" - instead of blocking/503ing all new incoming requests, then waiting for all the existing requests to finish, and only then creating a new process and delegating all new requests there - it instantly creates a new process which overlaps with another existing process. This feature (or, more accurately, the ability to disable it) does make sense since there are applications which do not work properly with multiple process instances - yes, in many cases this is caused by smelly application design - but not always.
And IIS has no way to understand whether your application has or hasn't completely "warmed up". In modern DI/LazyLoading-driven applications the warm-up stage may even never complete since some resources would only get initialized during specific requests which may simply never happen for the whole process lifetime. Attempts to build a universal warmup-finished-detection technique would most likely either just fail, or would be ugly/buggy, or would require customizations within applications themselves (providing externally usable warmup methods). It is too individual.
P.S. All I've written about overlapped recycling is about .NET Framework apps, not ASP.NET Core. The latter does have a problem and we even had to completely disable scheduled recycling of ASP.NET Core applications to prevent regular 500 errors on frontends due to backends responding 503 during recycles.
FlorianRainer commentedon Jan 17, 2022
I can confirm the
double-runs of Application_Start (in global.asax)Problem, described by @triynkotriynko commentedon Feb 18, 2022
Update since my last post. This is way more complex than I originally thought it would be. The overlapped recycling does work like it's supposed to, but there is a very specific issue that causes double or even triple initialization runs.
First, on the topic of detecting when an app has warmed up:
It actually can and does detect when it's warmed up correctly. For example,
preloadEnabledsends an initial request, which returns only afterApplication_Starthas completed. Asynchronous warmups aside, as long as it waits for Application_Start to complete, it's fine. That means the app is able to serve requests. We do all our initialization inApplication_Startand increase the startup/ping timeouts to allow it enough time to complete. In addition, IIS supports 'warmup' pages, and I've confirmed this works correctly too. During overlapped recycling, it not only finishesApplication_Start, it also finishes executing the warmup pages before it starts handing requests to the new/overlapped process. The result is a completely undisrupted call chain with a sudden transition to the new process serving requests. The returned responses also confirm the value of my 'WarmedUp' flag set in the response header (sourced from a static variable assigned in my warmup endpoint), with no delayed requests at all.Now, here's where things get interesting.
Microsoft's docker entrypoint executable ServiceMonitor, is what's coming in and disrupting everything. Because our apps are set to use autoStart and preloadEnabled, there's this docker-container-system-initiated run of the w3svc service that starts up the app pool and application right away, before ServiceMonitor even gets involved. That run is DOOMED and pointless. It's missing ENV variables that ServiceMonitor will eventually inject and so on. So the first thing ServiceMonitor does is try to stop the service, then inject environment variables in the DefaultAppPool's config section, then restart the service. So, to work around that doomed run, we simply set the startupMode of the w3svc service to 'Manual' (via Powershell script) when we build the docker container. That way, it's not initially running, there is no doomed run, and ServiceMonitor starts up, configures what it needs to, starts w3svc (for the first time) on it's own, then we see just a single run of application start! 😄
Except in ECS. We were seeing triple, not double, app startup runs there. So while we were able to reduce from 2 extra startups to 1 extra startup, we have no idea why this extra startup run is being triggered. It's something unique to the ECS environment that doesn't happen when running the image locally in docker desktop. The other strange thing about it is that it's an in-process recycle -- the kind you'd see if you modified a web.config file, and unlike the new-process, overlapped recycle that would happen if you modified some application pool setting. This in-process recycle is particularly bad for us, because it can crash the process when we're using SignalFx tracing libraries that hook into the CLR; we get sharing violations when it tries to load the domain-neutral assemblies inside the same process under a different AppDomain. Therefore, the only valid recycling we can support is new-process / overlapped recycling, such as scheduled recycling, and that's all we really want to support anyway.
Another strange thing is if dump all environment variables in Application_Start to disk (i.e. via
Environment.GetEnvironmentVariables), the first Application_Start run is missing 2 variables that the 2nd one has. So... same process, but new run of Application_Start, and it lists outAPP_POOL_CONFIGandAPP_POOL_IDvariables. And then, if I manually trigger a recycle with Powershell'sRestart-WebAppPool DefaultAppPool, the new process is missing those two variables just like the original one was. So there's this very inconsistent behavior in docker and across recycles, particularly in ECS-deployed apps that's really, really bothering me. This double/triple recycling and triple cache-hydration is even leading to OutOfMemory exceptions on these already-memory-constrained systems (but that's another subject to be dealt with separately).alex-jitbit commentedon Apr 20, 2022
Please reopen this issue, it still hasn't been fixed after 2.5 years.
alex-jitbit commentedon Apr 20, 2022
@triynko your comments about .NET Framework are completely off the topic by the way, this repo is about .NET Core.
benjamin-stern commentedon Apr 26, 2022
Agreed Experiencing this issue currently and there doesn't even seem to be a known workaround. Maybe @HaoK can comment on what's been decided to be done for this issue, or if there is a viable workaround for this issue?