WebHostOptions default ShutdownTimeout does not match HostOptions default ShutdownTimeout
See original GitHub issueDescribe the bug
The default value for ShutdownTimeout
in Microsoft.Extensions.Hosting.HostOptions
was updated to 30 seconds as part of https://github.com/dotnet/runtime/issues/63709
The default value for ShutdownTimeout
in WebHostOptions
should be made consistent with this so that the default shutdown behaviour is consistent for services using GenericWebHostService
and WebHost
.
Expected Behavior
Default values for HostOptions.ShutdownTimeout
and WebHostOptions.ShutdownTimeout
should match for consistent stopping behaviour across both when ShutdownTimeout
has not been set via configuration (Config for key: shutdownTimeoutSeconds
)
Steps To Reproduce
No response
Exceptions (if any)
No response
.NET Version
No response
Anything else?
No response
Issue Analytics
- State:
- Created 4 months ago
- Reactions:1
- Comments:5 (4 by maintainers)
Top Results From Across the Web
c# - How to apply HostOptions.ShutdownTimeout when ...
By default it is 5 seconds. However, I can't figure out where and how to write the code to specify this option in...
Read more >HostOptions.ShutdownTimeout Property
Gets or sets the default timeout for StopAsync(CancellationToken). public: property TimeSpan ShutdownTimeout { TimeSpan get(); void set(TimeSpan value); };.
Read more >Extending the shutdown timeout setting to ensure graceful ...
The solution: increase the shutdown timeout. HostOptions isn't explicitly configured anywhere by default, so you will need to configure it ...
Read more >Role of "ShutdownTimeout" and "gab_isolate_time" in ...
The ShutdownTimeout default value of 120 can be changed by modifying the attribute." The default value for " ShutdownTimeout " and " gab_ ......
Read more >HostingEnvironmentSection.ShutdownTimeout Property
The default value for the ShutdownTimeout property is 30 seconds. ... If a debugger is attached to the application, the application will not...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Yes, it makes sense. They should all have the same default values
🤦 So you do