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
I have several ASP.NET Core APIs that run on Azure App Service on Linux. These applications perform important work on shutdown (using IHostApplicationLifetime.ApplicationStopping). This work takes just a couple of seconds to complete, so shutdown timeouts should not be relevant.
When I run the APIs locally and use Ctrl-C to shutdown the API, this work is performed correctly. However, when restarting the APIs in Azure, whether by deploying new versions or manually restarting the app service through the Azure Portal, the shutdown tasks seem to never run. It is almost as if Azure App Service just kills the container or process something when I click "Stop" or "Restart" in the Azure Portal.
Is this intended?
Note that this problem does not exist on Azure App Service for Windows. There, the shutdown work is performed correctly.
I have several ASP.NET Core APIs that run on Azure App Service on Linux. These applications perform important work on shutdown (using
IHostApplicationLifetime.ApplicationStopping
). This work takes just a couple of seconds to complete, so shutdown timeouts should not be relevant.When I run the APIs locally and use Ctrl-C to shutdown the API, this work is performed correctly. However, when restarting the APIs in Azure, whether by deploying new versions or manually restarting the app service through the Azure Portal, the shutdown tasks seem to never run. It is almost as if Azure App Service just kills the container or process something when I click "Stop" or "Restart" in the Azure Portal.
Is this intended?
Note that this problem does not exist on Azure App Service for Windows. There, the shutdown work is performed correctly.
Possibly related:
dotnet/aspnetcore#18259
aspnet/AspNetCoreModule#115
The text was updated successfully, but these errors were encountered: