An Azure service that provides an event-driven serverless compute platform.
Thank you for reaching out to Microsoft Q&A.
The issue you are experiencing is caused by a Python language worker startup failure in Azure Functions when running on a Linux App Service (Dedicated) Plan with Python 3.12. Azure Functions uses a gRPC-based language worker to start and communicate with the Python runtime. On App Service plans, the Functions host waits for the Python worker process to initialize and report readiness within a fixed startup timeout (approximately 60 seconds). If the worker does not become ready within this time, the host terminates the startup process and returns HTTP 503, logging the exception System.TimeoutException from GrpcWorkerChannel.PendingItem.OnTimeout(). This timeout occurs before any function code is executed and is not configurable. The same application works on the Linux Consumption plan because it uses a different hosting image and startup behavior, where Python 3.12 is currently more stable. This is a known runtime limitation with Python 3.12 on Linux App Service plans and is not related to your function code or configuration.
Refer below points to resolve this issue or this is the workaround:
Downgrade Python version to 3.11 (Recommended workaround) Python 3.11 is currently the most stable and fully supported version for Azure Functions across all hosting plans, including Linux App Service plans. Switching to Python 3.11 avoids the language worker startup timeout seen with Python 3.12. Steps:
- Navigate to Azure Portal → Function App → Configuration → General settings
- Change Python version to 3.11
- Save the changes and restart the Function App
Use Linux Consumption, Flex Consumption, or Premium plan if Python 3.12 is required If upgrading or downgrading Python is not an option and Python 3.12 must be used, hosting the Function App on Linux Consumption, Flex Consumption, or Premium plans is a viable workaround, as these plans have different runtime behavior where Python 3.12 initializes successfully.
Confirm the issue is during worker startup and not function execution Enable Application Insights or review Log Stream and verify logs such as Failed to start language worker process and GrpcWorkerChannel.PendingItem.OnTimeout(). This confirms the failure happens during Python worker startup and is unrelated to application logic.
Note on unsupported mitigations Increasing functionTimeout, scaling the App Service plan, enabling Always On, or optimizing function code will not resolve this issue, as the failure occurs during the Python worker initialization phase, before any function invocation.
If the resolution was helpful, kindly take a moment to click on
and click on Yes for was this answer helpful. And, if you have any further query do let us know.