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

Custom Handlers - Graceful shutdown/SIGTERM #2490

Open
KarlGW opened this issue Jun 2, 2024 · 0 comments
Open

Custom Handlers - Graceful shutdown/SIGTERM #2490

KarlGW opened this issue Jun 2, 2024 · 0 comments

Comments

@KarlGW
Copy link

KarlGW commented Jun 2, 2024

Hello!

There doesn't seem to be any documentation on how Azure Functions with Custom Handlers handles (or provides functionality) for SIGTERM and in extension the possibility for graceful shutdowns. I've looked through old and other issues regarding this, but none of them (that I could find) is about how it is handled with custom handlers.

I've tried to enable signal handling within my application written in Go (and it works locally). But running it through func, only tests with simple logging works. Adding additional work will just make the process exit. The same result with the application deployed to a function app (both Windows and Linux based function apps on a consumption plan), with the difference that the "shutdown" logs aren't shown at all in application insights when the function app "scales down to 0"/shuts down.

This raises the following questions:

  1. Is it supported?
  2. If it is, how is it handled properly?
  3. What are the timeouts?
  4. Can these be configured?

Best regards

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant