Azure Functions Host Initializing over and over again

Tom Gutzler 21 Reputation points
2021-08-16T04:09:14.497+00:00

I'm seeing multiple "Initializing Host" messages per hour in app insights. I wonder if this is to be expected.

My functions are mainly queue triggered and I've configured batchSize = 1 in my host.json so I don't expect parallel execution.
There is one timer triggered function that does nothing. It fires every 9 minutes.

Host initialization happens even when there is no activity on the queues.
I'm running functions v3

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
5,909 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Pramod Valavala 20,656 Reputation points Microsoft Employee Moderator
    2021-08-17T09:20:33.887+00:00

    @Tom Gutzler While your batchSize is set to 1 and assuming you are running on the consumption tier, your function app could scale out to multiple instances causing the multiple logs. Also, when there is no activity, your function app would scale down to zero and a new message would trigger the function app to start up, again causing the log.

    If you need to ensure your function app doesn't scale out beyond on a single instance, then you can limit the scale out as covered in the docs.


Your answer

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