Azure / Azure/azure-functions-host

Function timeout and unhandled exception causes the entire host to shut down

Open
#6,714 9 comments 0 reactions 1 assignee Claimed by @mhoeger View on GitHub
Dominant language
C#
Stars
2k
Forks
482
Avg merge
2d 12h
Merged PRs (30d)
38

Description

Framework: .net core 3.1
OS: Windows
Function runtime: v3

We have a single App Service Plan which runs 17 apps on 20 machines. By looking at the Application Insights logs we see that on each machine there is one process per app, so each machine runs 17 processes. **Please confirm if our assumptions is correct.**

In the logs we often see messages such as "Host is shutting down" and "Host initialized". It seems host is shutting down happens when a function in an app times out, or when there is an unhandled Exception. If a function in an app causes the host to shut down, **does this mean that machine will briefly fail to serve traffic for that particular app until a new host for that app gets started back up?**

In the case where the host is shut down due to a single function in the app timing out, why not just kill the thread and keep the process (host)?

In the case where the host is shut down due to an unhandled exception that happens in the function itself, again why not just kill the thread and keep the process running so it can still serve the new incoming traffic?

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.