-
Notifications
You must be signed in to change notification settings - Fork 442
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
On worker error, wait for worker initialization if one or more are initializing before sending request #5629
Comments
cc @yojagad azure-functions-host/src/WebJobs.Script/Description/Workers/WorkerFunctionInvoker.cs Lines 91 to 107 in bd350f3
Waits till atlease one language worker starts. If starting worker continues to fail, functions host is shutdown. Needs more investigation. |
The code above only works if Each language worker channel has an action buffer that delays requests until they're ready too though:
If we remove this check, Line 269 in 3eb520c
requests will go into that queue. One potential error case is if the initializing worker ends up failing to start and we don't modify code to keep those queued requests from being lost or ending in error. I think either the approach would resolve these issues though |
Thanks for more details. Check to verify the status of worker channel: Line 269 in 3eb520c
is needed to avoid sending requests even before buffers are setup. Resetting FunctionDispatcherState is the right approach! |
We should not send requests while no worker channels are available AND we're currently trying to start one up. Kindof similar to #5624 , but in this case no worker channels are available and were NOT currently trying to start one (because things are shutting down).
In one case, I see a worker process executing find and then run into an uncaught exception (publish WorkerErrorEvent). We dispose the worker channel and go through "Initiating worker Process start up".
The Function Invocation Buffer and all is set up. However, it hasn't started yet and isn't found - likely due to this code:
azure-functions-host/src/WebJobs.Script/Workers/Rpc/FunctionRegistration/RpcFunctionInvocationDispatcher.cs
Line 269 in 3eb520c
The text was updated successfully, but these errors were encountered: