DEV Community

Maria Allen
Maria Allen

Posted on

Unexpected Slow Startup Times in Azure Functions Using Consumption Plan

Hi all, We are seeing some frustratingly slow and unpredictable startup times with an Azure Function that's on the Consumption Plan.

Typically, the function fires off in a matter of seconds, but every so often, we are looking at a 20–40 second wait before the initial code even starts running.

Here is what we have been able to figure out:

The sluggishness tends to kick in after the function has been sitting idle for a while.

Application Insights is pointing to a considerable delay before the function runtime actually gets going.

The function is built with .NET 6, and the startup code is kept to a minimum.

Once the function begins executing, there are no noticeable spikes in memory or CPU usage. Always On isn't an option with the Consumption Plan.

We are trying to figure out if the delay is solely due to cold starts, or if something in our setup—dependencies, networking, triggers, and so on—is also playing a role.

Has anyone discovered useful methods for reducing or troubleshooting slow startup times in Azure Functions on the Consumption Plan?

Top comments (0)