Hi,
We started last week to get random 404 error messages in our application in production. After several investigations inside our application, it seems that the problem is within the Functions Host. It seems that after a cold start, the first API call hitting our Function App returns 404.
Please provide the following:
Provide the steps required to reproduce the problem:
Remarks:
None found.
Provide any related information
If you provide us with valid previous versions runtime that we could use to force a runtime version and compare behavior, we would be able to do that.
@SimonLuckenuik Please try pinning back to 2.0.12742.0. We've seen a couple of reports of this behavior and investigation is in progress. Also I'd like to apologize for the confusion around releases. The announcements, releases and actual released bits are clearly not in sync right now. We will fix that (and figure out how we screwed it up).
Thanks for the follow-up Paul. I just tried the suggested downgrade, and I was not able to reproduce my problem with the steps listed above.
If you need us to do some tests to support you, let me know. We can easily reproduce and have some environments that could be used if you want to investigate or enable more logging and so on. This issue has got attention internally since it affects our customers in production and made management nervous about Azure Functions stability (no update in our application and application stops working from a customer perspective).
@paulbatum How long will this runtime actually be available? We see that runtimes are being deprecated pretty quickly.
cc @mathewc @fabiocav
We now understand the root cause. JobHost state is set to "Initialized" before Http routes are added here: https://github.com/Azure/azure-functions-host/blob/dev/src/WebJobs.Script.WebHost/HttpInitializationService.cs#L95
We are working on the fix and will prepare to roll out a hot fix ASAP.
@SimonLuckenuik Please try pinning back to
2.0.12742.0.
Can you point me in the direction on how to do this?
To pin the runtime version simply change the value of FUNCTIONS_EXTENSION_VERSION in the application settings of your function app.
Ref: https://docs.microsoft.com/en-us/azure/azure-functions/set-runtime-version
Resolved by #5102 . We'll post an update in the release announcements when the hotfix starts rolling out.
Thank you @SimonLuckenuik for reporting this!
Thank you to the team for the quick turnaround time!
Thanks @fabiocav !
@sneckelmann That won't work. The local.settings.json file is only intended for local development. You'll need to follow the steps outlined here.
Thanks @paulbatum . I was trying to get the "pin" for local development (and of course what I did didn't work!).
Any resources for local dev "pinning"?
@sneckelmann You should not need to pin locally, because we did not do a core tools release for the build with this bug. When you F5 in VS you should currently see version "2.0.12763.0" which is prior to 12775.
To answer your question more generally, in order to have direct control over what version of the runtime you are running locally from VS, you need to download a specific functions core tools release and then customize VS to use that. This page outlines the general approach of how to do this.
Thank you @paulbatum .
@gbilodeau How long a given version lasts will vary, as it depends on how often we are releasing (unfortunately there is a limit on how many parallel versions we can allow). We will not remove 2.0.12742.0 until some time after the release of the hotfix for this issue.
Most helpful comment
Resolved by #5102 . We'll post an update in the release announcements when the hotfix starts rolling out.
Thank you @SimonLuckenuik for reporting this!