Deploying to Azure Functions not working

Anonymous
2023-03-08T13:02:35.2333333+00:00

I frequently deploy code to Azure Functions without any problems, but when I tried to do so today (with no significant updates to the code or to Azure) I first got an error when Syncing the triggers:

12:05:31 PM my-fa: Deployment successful. deployer = ms-azuretools-vscode deploymentPath = Functions App ZipDeploy. Extract zip. Remote build.
12:05:43 PM my-fa: Syncing triggers...
12:05:49 PM my-fa: Syncing triggers (Attempt 2/6)...
12:06:00 PM my-fa: Syncing triggers (Attempt 3/6)...
12:06:21 PM my-fa: Syncing triggers (Attempt 4/6)...
12:07:01 PM my-fa: Syncing triggers (Attempt 5/6)...
12:08:22 PM my-fa: Syncing triggers (Attempt 6/6)...
12:08:23 PM: Error: Encountered an error (ServiceUnavailable) from host runtime.

I found that this might be due to different settings between local and azure, so I've checked this, and it is the same.

However, in the Azure portal, it says 'Azure Functions runtime is unreachable', but all common causes of this (no access to storage account) are checked (storage account exists, connection string is correct, no issues with firewall etc).

When retrying to deploy again, most of the times I don't even get past this:

13:48:56 my-fa: Starting deployment...
13:48:56 my-fa: Creating zip package...
13:48:56 my-fa: Zip package size: 79.25 kB
13:51:01: Error: The service is unavailable.

Sometimes I get past this, but then I get the error message when syncing the triggers.

When I create a new function app with a new storage account in the same resource group, I cannot deploy a simple function to this new function app, it immediately gives the same errors as described above, also the 'Azure Functions runtime is unreachable' error for this newly created resource.

What causes all this?

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

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.