Azure / Azure/azure-functions-host

ScriptHost stopped after WebHostRpcWorkerChannelManager stopped

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

Description

https://github.com/Azure/azure-functions-host/blob/dev/src/WebJobs.Script.WebHost/WebHostServiceCollectionExtensions.cs#L130

This can lead to a "Did not find initialized language worker" failure of a function execution for languages with webhost level workers.

Order of events:
- Execution begins for function X
- StopApplication() from somewhere
- Web host level channels stopped [here](https://github.com/Azure/azure-functions-host/blob/f987062b51d36b2a66f8bb2f1aeae9a4012d48ed/src/WebJobs.Script/Workers/Rpc/RpcInitializationService.cs#L79)
- Execution continues... does not find initialized language workers
- ScriptHost stopped [here](https://github.com/Azure/azure-functions-host/blob/f987062b51d36b2a66f8bb2f1aeae9a4012d48ed/src/WebJobs.Script.WebHost/WebJobsScriptHostService.cs#L379) which would prevent the "did not find initialized language workers"

Applicable to java always. Applicable to python always in production. Applicable to node in production (with placeholders)

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.