Azure Function and Warning

Tarun Mehta 71 Reputation points
2022-06-02T12:50:37.083+00:00

we have an azure function with http trigger, which is used for serving static content from storage account. Sometimes we are getting following error:

WARNING: INITIALIZATION: Fallback context save mode to process because of error during checking token cache persistence: Could not find file 'C:\home\site\wwwroot.IdentityService'

Then the function run takes about 10-20 seconds. What could be the issue and what should we do to fix this?

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
2,617 questions
No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Bruno Lucas 3,871 Reputation points MVP
    2022-06-03T02:27:24.283+00:00

    Hi @Tarun Mehta ,

    Can you share your code?

    Are you trying to do something that requires a Service Principal? like in:
    https://learn.microsoft.com/en-us/azure/developer/javascript/how-to/with-web-app/azure-function-resource-group-management/create-function-app


  2. Tarun Mehta 71 Reputation points
    2022-06-03T05:02:56.387+00:00

    My investigation about issue with customer:-
    As we discussed in today’s session, I am writing to summarize the action we took as below.

    We have checked the
    AZURE_CLIENT_ID which was configured with system assigned Id which is supposed
    to be the User assigned MSI's client ID but he has no requirement of the AZURE_CLIENT_ID, hence we removed and restarted the function but warning was still persisting.

    We have also turned the system Identity turn off and back on again but the warning was still reflecting in the traces.

    For the initial slowness reported, the cause was suggested as a cold start issue, but as you would like us to further investigate on the
    warning

    Firstly, I am going to address the issues mentioned in your last email.

    I believe, the warning issue will go away, once we move to dedicated or elastic premium plan.
    Secondly, the slowness issue of the function app that you are currently facing is a consequence of cold start. Since you are in consumption plan the cold start issue will persist as it does not have an Always On feature. While both the plan mentioned above have this feature and this is why the cold start issue is been controlled here.

    To brief you about cold start issue:
    A cold start is an increase in latency for Functions which haven't been called recently. When using Azure Functions in the dedicated plan, the Functions host is always running, which means that cold start isn't really an issue. So, our scope is narrowed to Functions running the serverless consumption model.

    No comments