Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

StartMode=AlwaysRunning does not work unless you change garbage collection settings #19733

Closed
unionthugface opened this issue Aug 31, 2020 · 2 comments
Labels
needs-more-info Source - Docs.ms Docs Customer feedback via GitHub Issue

Comments

@unionthugface
Copy link
Contributor

The suggestions mentioned in the document for the Application Initialization Module that allegedly make a .NET Core app restart after shutdown in IIS (StartMode=AlwaysRunning and IdleTimeout=0) are not sufficient by themselves. With these settings, an app will get to the end of the application lifetime and still shut down without restarting; a hard recycle of the app will likewise shut the app down without restarting it. The missing component for me was changing the garbage collection settings:

<PropertyGroup>
    <ServerGarbageCollection>true</ServerGarbageCollection>
    <ConcurrentGarbageCollection>false</ConcurrentGarbageCollection>
</PropertyGroup>

See issues:
dotnet/aspnetcore#3849
dotnet/aspnetcore#19509


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

@Rick-Anderson
Copy link
Contributor

Let's keep the issue in dotnet/aspnetcore#19509 until it's verified

@katraf
Copy link

katraf commented Oct 27, 2021

The garbage collection solution did not help me. The issue was fixed only after enabling anonymous authentication.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-more-info Source - Docs.ms Docs Customer feedback via GitHub Issue
Projects
None yet
Development

No branches or pull requests

4 participants