az functionapp deployment constantly taking a long time

Rob Collie 21 Reputation points
2021-08-17T12:56:59.803+00:00

I'm deploying a series of Function apps. They all rely on a common library, and simply expose the triggers. I'm using a Linux machine with an agent to zip deploy each function using the 'az functionapp deployment' command.

For some reason, 1 function takes between 2 to 20 minutes to deploy. It's always the same function, and all the others take about 30 seconds.

Is there something that can cause such a delay?

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
4,257 questions
.NET CLI
.NET CLI
A cross-platform toolchain for developing, building, running, and publishing .NET applications.
322 questions
{count} votes

1 answer

Sort by: Most helpful
  1. MayankBargali-MSFT 68,471 Reputation points
    2021-08-30T03:32:33.51+00:00

    Posting for community:

    There is no specific timeframe in which the deployment will get completed as that would depend upon the no of files your function app has and the network in between.
    The suggestion would be verify if you have not set SCM_DO_BUILD_DURING_DEPLOYMENT to true in your application setting as this could be one of the reason. I don't see any configuration atleast at the command end az functionapp deployment source config-zip that could help with faster deployed but I do came across with this previous announcement and for faster depoyment you can use WEBSITE_RUN_FROM_PACKAGE as at deployment time, there is nothing to extract at all, since everything happens at runtime. For apps with a large number of files, this can make the deployment much faster.

    If the above didn't help then you can open a support ticket with us to assist you further.

    0 comments No comments