deploy FunctionApp on Premium Plan

Bin Jin (Forestay) 35 Reputation points
2023-04-19T10:10:23.5666667+00:00

I have a Azure Function deployed on Premium App Service Plan (EP1). Recently I am suggested to add WEBSITE_CONTENTAZUREFILECONNECTIONSTRING and WEBSITE_CONTENTSHARE into the Function settings, so I have updated my functionapp.bicep file:

        {

          name: 'AzureWebJobsStorage'

          value: storageAccountConnectionString

        }

        {

          name: 'WEBSITE_CONTENTAZUREFILECONNECTIONSTRING'

          value: storageAccountConnectionString

        }

        {

          name: 'WEBSITE_CONTENTSHARE'

          value: toLower(name)

        }

However, after adding these two setup, I cannot deploy the function any more with "func azure functionapp publish archidevscoreFunc --python" I get the error that "Error Uploading archive... (ServiceUnavailable)." or "Timed out waiting for SCM to update the Environment Settings" Removing these two settings (WEBSITE_CONTENTAZUREFILECONNECTIONSTRING and WEBSITE_CONTENTSHARE) would resolve the problem. Any idea why? Should I just ignore these two settings?

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

1 answer

Sort by: Most helpful
  1. brtrach-MSFT 17,731 Reputation points Microsoft Employee Moderator
    2023-04-22T03:16:54.1833333+00:00

    @Bin Jin (Forestay) If I understand correctly, you are having trouble deploying your Azure Function on a Premium App Service Plan after adding the WEBSITE_CONTENTAZUREFILECONNECTIONSTRING and WEBSITE_CONTENTSHARE settings. I'll do my best to help you out. The WEBSITE_CONTENTAZUREFILECONNECTIONSTRING and WEBSITE_CONTENTSHARE settings are used to configure the Azure Files storage account that is used to store the content for your Function App. These settings are required if you want to use Azure Files storage instead of the default storage option. The error you are seeing ("Error Uploading archive... (ServiceUnavailable)" or "Timed out waiting for SCM to update the Environment Settings") could be caused by a few different things, but it's possible that it's related to the Azure Files storage account. Here are a few things you can try:

    1. Check that the storage account you are using for Azure Files is configured correctly. Make sure that it is in the same region as your Function App, and that it has the correct access policies configured.
    2. Try deploying your Function App using a different deployment method, such as using the Azure portal or Azure DevOps. This may help you identify any issues with the deployment process. In general, I would not recommend ignoring the WEBSITE_CONTENTAZUREFILECONNECTIONSTRING and WEBSITE_CONTENTSHARE settings if you want to use Azure Files storage. These settings are required for the storage account to be used correctly.

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.