Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inconsistent warmup status response (499/200) #10756

Open
MarcinAtMS opened this issue Jan 17, 2025 · 2 comments
Open

Inconsistent warmup status response (499/200) #10756

MarcinAtMS opened this issue Jan 17, 2025 · 2 comments
Labels
area: http Items related to experience improvements for HTTP triggers Needs: Attention 👋

Comments

@MarcinAtMS
Copy link

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.
@jviau
Copy link
Contributor

jviau commented Jan 21, 2025

The Warmup function returns status code 499

499 was added recently to align with AspNetCore behavior. This code indicates client disconnection, so we cannot write the response to caller anymore. I think you can safely ignore the 499.

/cc @liliankasem

@jviau jviau added Needs: Author Feedback area: http Items related to experience improvements for HTTP triggers and removed Needs: Triage (Functions) labels Jan 21, 2025
@MarcinAtMS
Copy link
Author

The "client" in this case is the Functions runtime so it remains unclear why it's disconnecting. It is also not anything we can control; it would seem like a good thing if successful requests would terminate with a 200.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: http Items related to experience improvements for HTTP triggers Needs: Attention 👋
Projects
None yet
Development

No branches or pull requests

2 participants