question

RobCollie-6002 avatar image
0 Votes"
RobCollie-6002 asked MayankBargali-MSFT answered

az functionapp deployment constantly taking a long time

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-functionsdotnet-cli
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@RobCollie-6002 Can you share more details on how you are deploying your function (kudu zip push deployment for a function app, URL for a git repository endpoint to clone and push to for function app deployment etc) along with the full command details and any logs that can confirm the same. You can share logs details in my private comment.

0 Votes 0 ·

1 Answer

MayankBargali-MSFT avatar image
0 Votes"
MayankBargali-MSFT answered

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.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.