question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

WebHostOptions default ShutdownTimeout does not match HostOptions default ShutdownTimeout

See original GitHub issue

Describe 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:closed
  • Created 4 months ago
  • Reactions:1
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
ReubenBondcommented, Jun 6, 2023

Yes, it makes sense. They should all have the same default values

0reactions
amcaseycommented, Jun 7, 2023

🤦 So you do

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found