Zip deploying to Azure App Services causes timeout (Error Code 504)

2023-06-27T06:35:49.66+00:00

I'm zip-deploying a web app in App Service with azure-cli.

If there are many modules to pip install, it will cause 504.0 GatewayTimeout.

I want to increase time to timeout. How do I set it?

code:python

Microsoft Deployment Toolkit
Microsoft Deployment Toolkit
A collection of Microsoft tools and documentation for automating desktop and server deployment. Previously known as Microsoft Solution Accelerator for Business Desktop Deployment (BDD).
848 questions
Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
7,255 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Grmacjon-MSFT 17,286 Reputation points
    2023-06-27T22:44:40.5266667+00:00

    Hi @Takahashi Kazuya ( 髙橋 和也 ) we are sorry to hear you're facing this issue. How long are you trying to increase time to timeout in your webapp?

    The error `504 Gateway Time-out' usually occurs when your webapp takes more than 230 seconds to return a response.

    Currently 230 seconds is a default timeout configured at the Azure App service load balancer. This is a part of the Azure App service architecture and cannot be configured or changed.

    If your web app requires background processing, we recommend using Azure WebJobs. The Azure web app can call WebJobs and be notified when background processing is finished. You can choose from multiple methods for using WebJobs, including queues and triggers.

    WebJobs is designed for background processing. You can do as much background processing as you want in a WebJob. For more information about WebJobs, see Run background tasks with WebJobs.

    Hope that helps. Please let us know if you have further questions.

    -Grace

    1 person found this answer helpful.

  2. Yoshitaka Nakata 0 Reputation points MVP
    2024-04-02T09:31:17.9433333+00:00

    Please check your App Service settings.1. In the Azure portal, select target your app of App Services.

    1. In the app's left menu, select Configuration > General settings.
    2. For SCM Basic Auth Publishing Credentials or FTP Basic Auth Publishing Credentials, select Off, then select Save.
    3. Next, For SCM Basic Auth Publishing Credentials or FTP Basic Auth Publishing Credentials, select On, then select Save.
    4. Then zip-deploying a web app.

    cf.Disable basic authentication in App Service deployments

    0 comments No comments