Azure / Azure/azure-functions-host

Add limit to host startup retries

Open
#10,685 0 comments 0 reactions 0 assignees View on GitHub
design needs-discussion needs-investigation
Dominant language
C#
Stars
2k
Forks
482
Avg merge
2d 12h
Merged PRs (30d)
38

Description

There are certain scenarios where the host will attempt to startup forever, which can lead to an effectively dead host. This can happen when something in the underlying platform has gone wrong (we see this rarely with SocketExceptions on startup, for example). Instead of trying forever, giving some limit and then shutting down the process would be beneficial to letting the platform attempt to recover.

We'll need to look through all the hosting scenarios to see what the best behavior is here, but retrying forever in these cases doesn't seem like the best behavior.

Alternatively -- the host should report that it is unhealthy after some number of attempted startups so that the platform can take the correct action.

Contributor guide

Open the contributing guide

Research direction

Start by mapping the hosting scenarios and startup retry paths involved in the host, then investigate how SocketExceptions during startup are handled. Define the desired behavior for bounded retries or an unhealthy status, including when the process should shut down or let the platform recover.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
backend, cloud
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.