I have a Service Bus queue trigger function implemented in C#, running as dotnet-isolated mode, that is processing the incoming queue messages successfully most of the time. The function app is in premium plan with EP1 instance. However, many a times in a day, there is this below exception logged in Application Insights,
System.InvalidOperationException
: Did not find any initialized language workers
at Microsoft.Azure.WebJobs.Script.Workers.Rpc.RpcFunctionInvocationDispatcherLoadBalancer.GetLanguageWorkerChannel(IEnumerable`1 rpcWorkerChannels) in /_/src/WebJobs.Script/Workers/Rpc/FunctionRegistration/RpcFunctionInvocationDispatcherLoadBalancer.cs:line 27
I am using Service bus Extensions SDK 5.17. The queue is session enabled, and the trigger is in ReceiveAndDelete
mode as in default. The message is processed afterwards, and in some cases goes to DLQ after max delivery attempts. Several hundred messages are ingested every minute into this queue, only few are encountering this error.
Several searches here in SO and Github weren’t useful – they are similar issue but years old with solution as upgrading to latest version of the Azure Service Bus SDK. Similar issue in 7618 Github, but that is older version and supposedly a fix was rolled out. Another unanswered issue in Github 9369
What could be the cause for this error, and what is the resolution? It could not be because of ‘cold-start’ because we are having pre-warmed instances in our premium plan.