Azure function swap fails with internal server error

Niels van der Kaap 6 Reputation points
2022-02-16T00:43:07.317+00:00

My Azure function has a staging and production slot. Both have vnet enabled, and have WEBSITE_CONTENTOVERVNET=1 & vnetRouteAllEnable=true. Deployment of the zip package to the staging and production slots works, and the function operates properly in both slots.

On swapping the staging slot to the production slot, I receive the following error: Failed to complete swap between slot 'staging' and slot 'production'. Error: {"_body":"{\"Code\":\"InternalServerError\",\"Message\":\"There was an unexpected error swapping slots 'staging' and 'production' for site 'qn-dev-we-fnc-exceptionhandling-resolve-1-0(staging)'. Please try to cancel your swap operation

The check swap operations log shows the following detailed error: Swap failed. Details: System.ServiceModel.Web.WebFaultException`1[Microsoft.Web.Hosting.Administration.ErrorEntity]: Bad Request (Fault Detail is equal to Code: BadRequest, ExtendedCode: Storage access failed. Storage volume is currently in R/O mode, Message: 04234).

Turning off the vnet fixes the issue. Any help would be appreciated!

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

1 answer

Sort by: Most helpful
  1. Niels van der Kaap 6 Reputation points
    2022-05-05T14:40:15.19+00:00

    My issue was fixed by switching to internal storage. I removed the WEBSITE_CONTENTSHARE and WEBSITE_CONTENTAZUREFILECONNECTIONSTRING app settings.

    1 person found this answer helpful.

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.