Description
Is your question related to a specific version? If so, please specify:
Azure Functions Host version: 4.x (4.1039.500.1)
Platform: Linux
SKU: Consumption Plan
Language: Python 3.10
What language does your question apply to? (e.g. C#, JavaScript, Java, All)
Python
Question
I'd appreciate some help in diagnosing a transient error in my Python Function App. A timer-triggered function failed for 3 consecutive invocations before recovering on its own. There were no deployments or configuration changes made during this period.
The failure is an RpcException
originating from the host, which seems to be caused by an underlying AssertionError
within the Python worker process. Here is the relevant part of the exception stack trace:
Exception while executing function
/Functions.timer ---> Microsoft.Azure.WebJobs.Script.Workers.Rpc.RpcException
/Result
/Failure Exception
/AssertionError
/
/
'/azure-functions-host/workers/python/3.10/LINUX/X64/azure_functions_worker/dispatcher.py', line 606, in _handle__invocation_request assert fi is not None
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
Could you please help explain what this error indicates? Given that it was transient and occurred on a Consumption plan app, could this be related to instance initialisation (like a cold start)?
For a business-critical application, what is the recommended way to prevent this specific type of failure? Would moving to a plan with pre-warmed instances (Premium or App Service Plan) be an effective mitigation strategy?