App Service deploy timeout

Satish A 6 Reputation points
2022-02-22T20:54:36.98+00:00

Hi, I am running the following command to deploy app service

I am using following az cli version
azure-cli 2.26.1 *

az webapp deploy --timeout 900000 --clean true $(deploy_trace_level) \ --resource-group $(azureResourceGroup) \ --name $(azureAppName) $(slot) \ --type zip --src-path \ $(System.DefaultWorkingDirectory)/$(app_archive) 2> /dev/null
I did add WEBSITE_ENABLE_SYNC_UPDATE_SITE = false

but after 4min51 seconds my command times out.

attaching the debug log

DEBUG: cli.azure.cli.core.util: Traceback (most recent call last): File "/opt/az/lib/python3.6/site-packages/knack/cli.py", line 231, in invoke cmd_result = self.invocation.execute(args) File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 657, in execute raise ex File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 720, in _run_jobs_serially results.append(self._run_job(expanded_arg, cmd_copy)) File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 691, in _run_job result = cmd_copy(params) File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 328, in __call__ return self.handler(*args, **kwargs) File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/command_operation.py", line 121, in handler return op(**command_args) File "/opt/az/lib/python3.6/site-packages/azure/cli/command_modules/appservice/custom.py", line 4037, in perform_onedeploy return _perform_onedeploy_internal(params) File "/opt/az/lib/python3.6/site-packages/azure/cli/command_modules/appservice/custom.py", line 4202, in _perform_onedeploy_internal response = _make_onedeploy_request(params) File "/opt/az/lib/python3.6/site-packages/azure/cli/command_modules/appservice/custom.py", line 4191, in _make_onedeploy_request .format(response.status_code, response.text)) knack.util.CLIError: An error occured during deployment. Status Code: 500, Details: <html><head><title>500 - The request timed out.</title></head><body> <font color ="#aa0000"> <h2>500 - The request timed out.</h2></font> The web server failed to respond within the specified time.</body></html>' am I missing anything else?

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Ryan Hill 30,326 Reputation points Microsoft Employee Moderator
    2022-02-23T03:13:33.68+00:00

    I for one, haven't had az webapp deploy command that elaborate; I've basically used the examples listed on https://learn.microsoft.com/en-us/azure/app-service/deploy-zip?tabs=cli#deploy-a-zip-package without issue.

    Nonetheless, to troubleshoot your command though, I suggest the following:

    • First make sure you can access https://{azureAppName}.scm.azurewebsites.net/.
    • Secondly, your $(slot) missing the --slot switch.
    • Add the --debug switch to see what endpoint the command is actually hitting.

    It looks like you're running this CLI command from CI/CD pipeline, which is completely fine but it would be far easier to use GitHub actions the Web App Task if you're using Azure DevOps or


Your answer

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