Azure / Azure/azure-functions-host

Inconsistent warmup status response (499/200)

Open
#10,756 4 comments 0 reactions 0 assignees View on GitHub
area: http needs-investigation
Dominant language
C#
Stars
2k
Forks
482
Avg merge
2d 10h
Merged PRs (30d)
36

Description

These are the results of some back and forth between App Service support and product group, the result of which was the recommendation to create an issue here. If it's helpful, the tracking id was #2411050010001940.

The Warmup function returns status code 499, but otherwise seems to function properly. Some requests return 200s as expected. This seems unexpected behavior and makes alerting for errors (> 400, for example) more complicated. It seems as if the host is only able to hang on to the connection for an unpredictable amount of time, resulting in the inconsistency. I can repro this relatively easily on many of my team's functions. I am including a recent one as an example.

#### Investigative information

Please provide the following:

- Timestamp: 2025-01-17T17:29:45.7229175Z
- Function App version: dotnet-isolated net8, sdk version: azurefunctions: 4.1036.3.23284
- Function App name: mcg-consentaudit-prod1
- Function name(s) (as appropriate): Warmup
- Invocation ID: |948ddf68-4c7445590ad3792c.
- Region: East US

These are from Application Insights.

#### Repro steps

Provide the steps required to reproduce the problem:

1. Create a WarmupTrigger function on your Function App.
2. Observe status codes when deployed and running.

#### Expected behavior

200 on successful Warmup completion.

#### Actual behavior

499 on successful (Success: True) Warmup completion.

#### Known workarounds

N/A, function runtime does not appear impaired.

#### Related information

We were able to address and eliminate the following concerns during research.
- these are NOT consecutive invocations, only one Warmup function is occurring per startup per instance
- the Warmup api is being invoked only by the host, not via postman or another client
- we are following the guidance in the MS Learn Warmup trigger article exactly

These additional details are from the Product Group directly.

- Application Insights is accurately reporting that the client is disconnecting, as confirmed by front-end role logs. While the Function Host may not immediately detect the client disconnect and attempts to return a 200-status code, this behavior does not appear to impact the application.
- PG suggested creating a GitHub issue for the Function Host to report this behavior for tracking and potential improvements. However, they confirmed that this behavior is functioning as designed and does not negatively impact the application.

Contributor guide

Open the contributing guide

Research direction

Start with the Function Host's WarmupTrigger entry point and compare the reported 499 and 200 outcomes against the Application Insights and front-end role logs described here. Done would require determining whether the host can consistently report 200 for successful warmup completion, while accounting for the product group's statement that the current behavior is by design.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, csharp
Domain
backend, cloud
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.