Azure / Azure/azure-functions-host

Worker may not restart when crashing in multi-language environment

Open
#10,694 0 comments 1 reaction 0 assignees View on GitHub
area: azure-logic-apps design needs-discussion
Dominant language
C#
Stars
2k
Forks
482
Avg merge
2d 10h
Merged PRs (30d)
36

Description

The [code here](https://github.com/Azure/azure-functions-host/blob/20e517f0//src/WebJobs.Script/Workers/Rpc/FunctionRegistration/RpcFunctionInvocationDispatcher.cs#L475-L485) checks whether the `FUNCTIONS_WORKER_RUNTIME` matches that of the worker that just crashed. In Functions-hosted scenarios, this works becuase there is only one worker language. However, in Logic Apps scenarios, the `FUNCTIONS_WORKER_RUNTIME` means very little and should not even be checked here.

The problem is this can cause a crashed worker to never restart. The host doesn't know this, so it continues accepting invocations and they all eventually timeout forever until the host is restarted.

Contributor guide

Open the contributing guide

Research direction

Start in src/WebJobs.Script/Workers/Rpc/FunctionRegistration/RpcFunctionInvocationDispatcher.cs around lines 475-485 and trace the worker crash handling flow. Verify the behavior for Logic Apps multi-language scenarios and ensure a crashed worker can restart instead of leaving later invocations timing out indefinitely.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
backend, cloud
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.