I had to switch to WEBSITE_RUN_FROM_PACAKGE, which is more reliable than the 'az functionapp deployment source config-zip' because you upload the zip to a storage account container yourself rather than hopeing the unreliable scm service will work.
503 Service Unavailable responses for zip deployment of flex consumption function app from cli
SarahKnowles-0841
0
Reputation points
I am using a Function App on the flex consumption plan. I've been deploying the code from a zip file using the azure CLI like this:
az functionapp deployment source config-zip --src PATH_TO_MY_LOCAL_ZIPFILE --build-remote false -g MY_RESOURCE_GROUP_NAME -n MY_FUNCTION_APP_NAME --subscription MY_SUBSCRIPTION_ID --debug
This has worked well for months, but in the last 48 hours it has become very flaky - we get a 503 response more often than not. I did not change any code between the deployment working and not working, so has there been a change to Azure?
The error I get looks like this:
WARNING: cli.azure.cli.command_modules.appservice.custom: Starting zip deployment. This operation can take a while to complete ...
DEBUG: urllib3.connectionpool: Starting new HTTPS connection (1): MY_REDACTED_FUNCTION_APP_NAME.scm.azurewebsites.net:443
DEBUG: urllib3.connectionpool: https://MY_REDACTED_FUNCTION_APP_NAME.scm.azurewebsites.net:443 "POST /api/publish?RemoteBuild=false&Deployer=az_cli HTTP/11" 503 27
WARNING: cli.azure.cli.command_modules.appservice.custom: Deployment endpoint responded with status code 503 for deployment id The service is unavailable.
In the last few hours, I've made 6 attempts to deploy the same function app with identical code, and got the following results:
- 10:31 fail - status code 503
- 13:11 success - status code 202
- 13:29 fail - status code 503
- 14:23 success - status code 202
- 14:51 fail - status code 503
- 15:03 fail - status code 503
Thanks for your help.