-
Notifications
You must be signed in to change notification settings - Fork 452
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
Function app with 'Warmup' function #10169
Comments
@fabiocav please triage |
Can you please clarify what you mean by re-specialization? |
@pragnagopa isn't this an issue caused by the platform failing to persist the site context file on disk, combined with a change to the host lifecycle management, where it is restarted in the same container? For the following:
For the default (initial) specialization failures, are you including host startup and/or indexing failures? Those would lead to health metrics emitted by the host.
For For |
@fabiocav thanks for the follow up.
Yes, this aligns with Note3 For
This is a good direction. I would like to discuss more on this with @balag0 in the context for "AdminOnly" mode For
I do not think we should revert to placeholder mode. More important for the platform to get right signals so Pod can be recycled. Flagging this for discussion with @balag0 as well. |
I think there are 2 issues: Issue 1)There are possible code paths where host will consider itself to be fully specialized and return that status even if the specialization failed because there are tasks performed in the background. azure-functions-host/src/WebJobs.Script.WebHost/Management/LinuxInstanceManager.cs Line 93 in 8fd50c6
When this happens, since the host is 'specialized', What we want to do: Issue 2) in this case, the host could be partially specialized or not specialized at all. platform thinks the host is fully specialized. so we are again in same exact scenario as issue 1. in summary, 2 things would help Note: Its definitely more likely for Issue2 to be more common since failures leading to issue1 is very rare due to lack of moving pieces compared to issue2. |
I think I am experiencing this issue. I've just published to a Flex Consumption plan of a previously working app. The app is a .NET 8 Isolated worker. The only function that is showing is this "WarmUp" function. |
I have the same problem here: Azure/functions-action#245 |
Are there any updates on this? Just trying this again with a new .NET 9 app on a Flex Consumption plan, and getting the same result. |
Execute: [Web] [Desktop] [Web (Lens)] [Desktop (SAW)] https://wawseus.kusto.windows.net/wawsprod
FunctionsLogs
| where PreciseTimeStamp >= datetime(2024-05-14T15:57:00.0000000Z) - 3h
| where PreciseTimeStamp <= datetime(2024-05-15T01:04:00.0000000Z) + 3h
| where SourceNamespace == "FunctionsLegion"
| extend PodName = RoleInstance
| where PodName == "3ea83371-4d4d-4d4e-bf18-ccf6aefc9798"
| project PreciseTimeStamp, Summary
| order by PreciseTimeStamp asc
| where Summary contains "Found the following functions:" or Summary contains "will attempt"
If functions runtime cannot fully specialize it can get stuck with the placeholder 'WarmUp' function
Sample pod - in the below case the specialization succeeded once and loaded the actual customer functions. Functions runtime restarted and then re-specialization failed (due to lack of container start context mount non-availability in this case) and the pod was left with 'Warmup' Function
Note1 - The exact thing to address is - we should never return WarmUp Function when customer lists functions (i.e portal shouldn't display 'Warmup' function)
Note2 - In the below pod the failure was during re-specialization but this can happen during initial specialization as well
Note3 - The exact reason here is a different bug (lack of context mount path) but even if we fix that, there might be other reasons for failures. so this workitem is to explore options to see if we can
a) dont switch to specialized mode if specialization is 'fully complete'
b) if we cannot do a, can we revert back to placeholder mode to prevent the instance from causing confusion
Execute: [Web] [Desktop] [Web (Lens)] [Desktop (SAW)] https://wawseus.kusto.windows.net/wawsprod
FunctionsLogs
| where PreciseTimeStamp >= datetime(2024-05-14T15:57:00.0000000Z) - 3h
| where PreciseTimeStamp <= datetime(2024-05-15T01:04:00.0000000Z) + 3h
| where SourceNamespace == "FunctionsLegion"
| extend PodName = RoleInstance
| where PodName == "3ea83371-4d4d-4d4e-bf18-ccf6aefc9798"
| project PreciseTimeStamp, Summary
| order by PreciseTimeStamp asc
| where Summary contains "Found the following functions:" or Summary contains "will attempt"
PreciseTimeStamp
Summary
2024-05-14 22:47:28.0664600
Found the following functions: Host.Functions.WarmUp
2024-05-14 22:47:31.0712436
Found the following functions: Host.Functions.WarmUp
2024-05-15 00:56:52.1614246
Found the following functions: Host.Functions.HelloWorld Host.Functions.HtmlParser Host.Functions.LoaderIO
2024-05-15 01:03:05.1607510
WebHost has shut down. Will attempt restart.
2024-05-15 01:03:30.1589962
Found the following functions: Host.Functions.WarmUp
The text was updated successfully, but these errors were encountered: