Azure / Azure/azure-functions-host

Make Graceful Shutdown timeout to be configurable or increase default value

Open
#7,103 6 comments 10 reactions 1 assignee Assigned to @soninaren View on GitHub
Dominant language
C#
Stars
2k
Forks
482
Avg merge
2d 12h
Merged PRs (30d)
38

Description

#### What problem would the feature you're requesting solve? Please describe.

To prepare for interruptions caused by deploying functions that have been running for a long time, we use `CancellationToken` to detect them and perform the necessary processing for graceful shutdown.

However, there seems to be a case where the function is forcibly shutdown before it completes successfully.

Checking the log, it seems to depend on the `shutdownTimeLimit` value of AspNetCoreModule, since it is shut down after about 10 seconds.

https://docs.microsoft.com/en-us/aspnet/core/host-and-deploy/iis/web-config?view=aspnetcore-5.0#attributes-of-the-aspnetcore-element

#### Describe the solution you'd like

1. Make the value of `shutdownTimeLimit` configurable
2. Or increase the default value from 10 seconds.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.