-
Notifications
You must be signed in to change notification settings - Fork 173
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
Graceful cancellation period on function timeout #2380
Comments
Hi @dmytro-gokun, a cancellation token should be getting signaled on function timeout, I believe there a graceful shutdown period of a couple seconds but is not configurable. Can you share more details about the issue you're seeing? If you're able to share a region, timestamp and invocation ID I should be able to investigate further. Thanks! |
@liliankasem I did some testing and I think you are right about CancellationToken and 2 second timeout. The reason i thought cancellation token was not signaled is that i have code like this:
with logs being set to Application Insights. So, that "Canceled" log does not end up in AI. I think the reason for that is that the worker gets restarted after the function timeout and some AI logs are lost. Not 100% sure about this though... |
If the issue is with AppInsights ingestion then I think we can track these issues in your other GH issue and close this one? |
Agree |
Description
When a function call is being cancelled because of the execution timeout, it does not seem that the CancellationToken passed to it being signaled. Instead, the function app simply exits. Would not it make more sense if the timeout-related shutdown was performed in a bit more 'graceful' way, i.e. CancellationToken signaled and some (configurable) graceful shutdown period allowed (e.g. 10 sec by default)?
The text was updated successfully, but these errors were encountered: