Long Living Instance of Azure Function App

Roy Zeng 80 Reputation points
2025-06-24T22:13:26.21+00:00

Hello, I noticed that there are instances had lifetime more than 24 hours while I did not set any "always-on" instances. I would like to ask if it is by design or such behavior was triggered by my actions?

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

1 answer

Sort by: Most helpful
  1. Obinna Ejidike 1,835 Reputation points
    2025-06-24T22:38:46.18+00:00

    Hi Roy Zeng

    Thanks for using the Q&A platform.

    Yes, it's actually by design in some scenarios, Azure Function App instances can live for 24+ hours, even without "always on" enabled.

    Azure Functions run on the App Service infrastructure, which uses a pool of workers. These worker instances may stay warm or live long to optimize cold start performance and reduce provisioning overhead.

    Even if "always on" is not set, Azure may keep an instance alive if it's been recently invoked or expected to be invoked soon. The Function runtime doesn’t forcibly shut down idle instances immediately; it’s event-driven, not lifecycle-driven.

    Except you’re seeing excessive costs or CPU usage, this is typically harmless and meant to improve performance. However, if you want to force instances to shut down, you'd need to scale to zero manually and avoid anything that keeps the app warm.

    If the response was helpful, please feel free to mark it as “Accepted Answer” and consider giving it an upvote. This helps others in the community as well.

    Regards,

    Obinna.

    0 comments No comments

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.