An Azure service that provides an event-driven serverless compute platform.
The available evidence fits a failure before function invocation dispatch more than an in-handler failure.
- Why the 60-second 503 can happen without failed invocations
- On Flex Consumption, Application Insights is the first place to investigate when there are dependency timeouts, DNS failures, or other connectivity symptoms.
- The documented telemetry split is important here:
-
requestsshows HTTP invocations that reached the app. -
tracesshows runtime, host, and scale-controller logs, including deployment initialization details on Flex Consumption. -
exceptionsshows runtime and user exceptions. -
FunctionAppLogshelps when Application Insights data is missing or incomplete, including host-level issues. -
AzureActivityhelps diagnose control-plane operations and trigger registration issues.
-
- A 503 with no invocation ID and no failed invocation aggregate is consistent with a request failing before the Python handler ran, but the current evidence does not prove the exact stage.
- How to distinguish pre-dispatch failure from execution timeout
Collect request-correlated telemetry in Application Insights and compare these signals:
- If the request reached invocation execution: expect evidence in
requests, and possibly matchingtracesorexceptionsfor the same time window. - If the failure happened before dispatch or readiness completed: expect missing or incomplete invocation evidence, while
traces,FunctionAppLogs, or platform-level logs may still show host startup, listener, trigger, or readiness-related activity. - For Flex Consumption specifically,
tracesis the documented place to look for host startup problems, deployment failures, and DNS failures that surface through host or dependency logs.
- If the request reached invocation execution: expect evidence in
- Customer-visible logs and detectors to use next
After enabling Application Insights, use the Logs experience and query these tables for the exact failure window:
- Host startup or deployment failures
traces | where timestamp > ago(1d) | where cloud_RoleName == "<APP_NAME>" | where message contains "Starting" or message contains "host" | project timestamp, message, customDimensions | order by timestamp desc- HTTP request timing and result codes
requests | where timestamp > ago(1h) | where cloud_RoleName == "<APP_NAME>" | project timestamp, name, resultCode, duration, success, url, operation_Name | order by timestamp desc- Exceptions grouped by type
exceptions | where timestamp > ago(1d) | where cloud_RoleName == "<APP_NAME>" | summarize count() by type, innermostMessage | order by count_ desc- Outbound dependency failures
Also review:dependencies | where timestamp > ago(2h) | where cloud_RoleName == "<APP_NAME>" | where success == false | project timestamp, target, resultCode, duration, type, data-
FunctionAppLogswhen Application Insights data is missing or incomplete. -
AzureActivityfor start, stop, sync triggers, delete, and list keys operations.
- What the current evidence does and does not support
- The health routes excluding GPT inference, token acquisition, and external API calls does rule out those external calls as the direct cause of those specific failures.
- The 60-second pattern alone does not establish that
functionTimeoutcaused the 503. The documented guidance says platform retries cover transient faults for triggers and bindings, but persistent failures such as misconfiguration are not retried automatically. - Python worker exit code 143 and later unhealthy-process observations may be relevant, but the available evidence does not establish causality for the failed requests.
- Before enabling Always Ready
Collect direct evidence first:
- Enable Application Insights.
- Reproduce the issue.
- Query
requestsfor the failed timestamps. - Query
tracesfor host startup, host lifecycle, and readiness-adjacent messages in the same window. - Check
FunctionAppLogsif Application Insights is incomplete. - Check
AzureActivityfor any control-plane events around the failures.
- request reached app vs did not reach app,
- host started vs host not ready,
- Python code exception vs platform/host path issue.
- Known related patterns in context Similar Flex Consumption cases in Q&A show that when there are no invocations or logs and behavior resumes after restart, the issue can indicate the Functions host stopped processing rather than a code or schedule problem. Another Q&A notes temporary 503s can also occur during platform issues. Those examples are not proof of the same root cause here, but they support checking host lifecycle and platform behavior before attributing the issue to application code.
The strongest next step is request-window correlation in Application Insights. That is the documented customer-visible path to distinguish HTTP request arrival, host startup behavior, exceptions, dependency behavior, and missing telemetry cases on Flex Consumption.
- Create and manage function apps in the Flex Consumption plan (programming-language-python)
- Reliability in Azure Functions (flex-consumption)
- Why would a Timer Triggered Azure Function in Flex Consumption stop invoking without any errors and only resume after a manual restart? - Microsoft Q&A
- Inquiry Regarding Azure Functions Service Stability, 503 Service Unavailable - Microsoft Q&A