azure-functions-host
azure-functions-host copied to clipboard
Function scales to 0 instances under load. Only wakes up when opened in Azure Portal
Check for a solution in the Azure portal
Have checked through almost all detectors, the errors I find is related to the swap action and no host errors after the swap completed.
Investigative information
This Azure Function is under constant load at around 900req/min from an EventHub trigger so from my perspective, it should never scale down. This has worked flawlessly for some time. Yesterday we swapped in some new code, and suddenly this function starts to just die on itself by scaling down to zero instances and not waking up. Does however wake up every time i navigate to the Azure Function resource in the portal, which is weird (see attached screenshots).
The below invocation information is when it scaled to zero for the first time. Please provide the following:
- Timestamp: 2022-11-14T15:31:54.3745689Z
- Function App version: 3.17.0.0
- Function App name:
- Function name(s) (as appropriate):
- Invocation ID: 42fcf1ad-df4f-4bae-b44d-dcebf312d9a1
- Region: West Europe
Repro steps
When function has scaled down to zero, use the invocation information above to navigate to the function and it will start to process events again.
Expected behavior
The function should not scale to zero and process my constant stream of EventHub requests.
Actual behavior
From application insights.
Timestamps in detector are offset compared to above picture due to timezone difference.
Execution stops for no apparent reason, starts when resource is visited in the Azure Portal.
Related information
Provide any related information
- Programming language used C# .Net
- Links to source N/A
- Bindings used EventHub Trigger, Cosmos DB Trigger