Azure Function App with Blob Storage Trigger is not Running
Hi,
I have an Azure Function App with a blob trigger function. I noticed that the function was not processing new images and had not processed any images for around 4 months.
To investigate I went to the "Invocations and more" tab. Shortly after doing so the Function started running and processing the 4 month old backlog of unprocessed blobs.
Do you know why this occurred?
Azure Functions
Azure Storage Accounts
-
Vinod Kumar Reddy Chilupuri • 3,750 Reputation points • Microsoft External Staff
2025-03-25T13:52:11.7866667+00:00 You can run Azure Functions in two different modes: Consumption plan and App Service plan. You must choose the type of hosting plan during the creation of the function app. You can’t change it afterward.
Consumption Plan
The consumption plan automatically allocates compute power when your code is running, scales out as necessary to handle load, and then scales down when code is not running. You don’t have to pay for idle VMs and don’t have to reserve capacity in advance. This is the serverless app model. The magic behind a consumption plan is all done via the scale controller. The scale controller automatically scales CPU and memory resources by adding additional function app instances. Scaling is based on the number of events that its functions are triggered on.
here consumption plan will lead to the function idle for a few moments. As far as I know, if we leave the function there for about 20 minutes, it will fall asleep (not hot start).
App Service Plan
In the App Service plan, your function apps run on dedicated VMs on Basic, Standard, Premium, and Isolated SKUs. You can scale up by choosing a different App Service plan, but the function app is always running. Scaling is done manually, or you can enable autoscale.
Because of the difference in nature, App service plans are always available if enabled so it triggered almost immediately. And in Consumption based plan it goes in an idle mode if it is not being used.
By accessing the "Invocations and more" tab, you may have inadvertently triggered the function to wake up from its idle state, allowing it to start processing the backlog of blobs. This behavior is not uncommon, as the function app may not be actively polling for changes in the blob storage when it has been inactive for a while.
Additional reference:
https://stackoverflow.com/a/54094025/6049604
https://stackoverflow.com/questions/59570772/azure-blob-storage-trigger-function-not-firingHope the above suggestion helps! Please let us know do you have any further queries.
Please do consider to “up-vote” wherever the information provided helps you, this can be beneficial to other community members.
-
Vinod Kumar Reddy Chilupuri • 3,750 Reputation points • Microsoft External Staff
2025-03-26T13:55:06.6066667+00:00 Hi Tiarnán Curran-Feeney,
I would like to inquire whether the provided response was beneficial to you. Please let us know do you have any further queries. We are here to assist you. Please do consider to “up-vote” wherever the information provided helps you, this can be beneficial to other community members. -
Vinod Kumar Reddy Chilupuri • 3,750 Reputation points • Microsoft External Staff
2025-03-27T13:32:32.7566667+00:00 Hi Tiarnán Curran-Feeney,
I would like to inquire whether the provided response was beneficial to you. Please let us know do you have any further queries. We are here to assist you. Please do consider to “up-vote” wherever the information provided helps you, this can be beneficial to other community members. -
Tiarnán Curran-Feeney • 0 Reputation points
2025-03-28T15:26:18.4+00:00 Hi,
That clarifies it perfectly. Thank you.
So the issue here is because the machine is on a Consumption plan is that correct?
-
Tiarnán Curran-Feeney • 0 Reputation points
2025-03-28T15:30:31.8833333+00:00 Just to follow up, does that mean a function app should never be hosted on a Consumption plan?
-
Vinod Kumar Reddy Chilupuri • 3,750 Reputation points • Microsoft External Staff
2025-03-29T07:05:19.7033333+00:00 Yes, the issue here is because the machine is on a Consumption plan.
It is not accurate to say that a function app should never be hosted on a Consumption plan. The Consumption plan is suitable for many scenarios, especially when you want to pay only for the time your functions are running. It's important to choose the correct hosting plan based on your specific needs, including performance and reliability.
If you require low latency and consistent performance, you might consider using the Premium plan or another hosting option that better fits your requirements.
Hope the above suggestion helps! Please let us know do you have any further queries.
Please do consider to “Accept the answer” and Upvote wherever the information provided helps you, this can be beneficial to other community members.
-
Tiarnán Curran-Feeney • 0 Reputation points
2025-03-29T13:30:51.7333333+00:00 Hi Vinod,
We don't require low latency but we do require the function app to run eventually for each blob image.
When the function falls asleep, I assume it should still trigger and wake back up? As mentioned in my original message 4 months of unresponsiveness seems a little extreme.
Under what circumstances is a consumption plan for a function app appropriate?
Can you provide a link to official documentation which validates the claim that a blob trigger function on the consumption app plan will fail to work?
-
Vinod Kumar Reddy Chilupuri • 3,750 Reputation points • Microsoft External Staff
2025-03-31T10:13:43.22+00:00 The behavior you observed with your Azure Function App not processing blobs for an extended period could be attributed to the nature of the Consumption plan. In the Consumption plan, Azure Functions can scale down to zero when there are no incoming triggers. This means that if your function app is idle for a prolonged period, it may not be actively running, which can lead to delays in processing events when new blobs are added.
When you accessed the "Invocations and more" tab, it likely triggered the function app to wake up and start processing the backlog of blobs. This is a common behavior in serverless architectures where functions may take some time to start up after being idle.
While the Consumption plan is suitable for applications with variable workloads and low traffic, it may not be ideal for scenarios requiring consistent and immediate processing of events. If you need your function to run reliably without such delays, you might consider using a Premium plan or an App Service plan, which allows for more control over scaling and does not scale down to zero.
Regarding the documentation, while I cannot provide a specific link validating the claim that a blob trigger function on the Consumption plan may not work as expected during idle periods, the general behavior of Azure Functions in the Consumption plan is well-documented.
Hope the above suggestion helps! Please let us know do you have any further queries.
Please do consider to “Accept the answer” and Upvote wherever the information provided helps you, this can be beneficial to other community members.
-
Tiarnán Curran-Feeney • 0 Reputation points
2025-03-31T16:12:26.3766667+00:00 Hi Vinod,
Thanks for getting back to me. As stated before, we don't need immediate results which is why we chose the Consumption plan.
However, there was a period of 4 months during which no images were processed. This is far more than we would be willing to accept. The documentation you provided does not explain this 4 month delay as it references a small delay of "up to several minutes".
There seems to be a problem here that needs addressing. That does not sound like it is to do with using the Consumption Plan. I would greatly appreciate your assistance.
-
Vinod Kumar Reddy Chilupuri • 3,750 Reputation points • Microsoft External Staff
2025-04-01T10:57:36.6566667+00:00 I understand about the product, please give your feedback here about the product please provide feedback to Microsoft through Azure Feedback Portal. Sharing detailed feedback can help highlight the importance of this issue and potentially expedite the development of a solution.
It is important to communicate the impact and urgency of this matter clearly to Microsoft, as user feedback plays a crucial role in their prioritization process. By doing so, you contribute to the improvement of their services, which can benefit all users facing similar challenges.
Your contribution is highly appreciated. Please do not forget to "Accept the answer” and “up-vote” wherever the information provided helps you, this can be beneficial to other community members.
-
Vinod Kumar Reddy Chilupuri • 3,750 Reputation points • Microsoft External Staff
2025-04-02T10:19:12.5966667+00:00 Hi Tiarnán Curran-Feeney,
I would like to inquire whether the provided response was beneficial to you. Please let us know do you have any further queries. We are here to assist you. Please do consider to “up-vote” wherever the information provided helps you, this can be beneficial to other community members. -
Tiarnán Curran-Feeney • 0 Reputation points
2025-04-02T16:48:37.8866667+00:00 Hi Vinod,
My issue has not been resolved yet. Do let me know if you can link me to docs answering my question
-
Loknathsatyasaivarma Mahali • 1,615 Reputation points • Microsoft External Staff
2025-04-03T00:29:09.4633333+00:00 Hello Tiarnán Curran-Feeney,
It looks like you're dealing with cold start latency in Azure Functions when your app scales down to zero. According to the Event-driven scaling in Azure Functions documentation, the platform may scale down the function app to zero instances if it becomes idle for a while, leading to the latency you’re experiencing when the next request triggers a cold start.
As mentioned, the cold start time can be influenced by the number of dependencies in your function app, which could be contributing to the delay. To address this, you can consider setting the Always Ready instance property, which is detailed in Create and manage function apps in a Flex Consumption plan. By upgrading to a Flex Consumption plan and configuring at least one always ready instance, you can help minimize the cold start time. However, if your app relies on too many dependencies, it's recommended to reassess the architecture as the cold start times might still be impacted.
In summary, upgrading to Flex Consumption and configuring an always ready instance could help, but it’s also important to review your app’s dependencies to ensure optimal performance.
-
Loknathsatyasaivarma Mahali • 1,615 Reputation points • Microsoft External Staff
2025-04-03T21:32:40.13+00:00 Hello Tiarnán Curran-Feeney,
Just checking in to see if you get a chance to review my previous message and if you have any further concerns, please feel free to drop them here.
-
Loknathsatyasaivarma Mahali • 1,615 Reputation points • Microsoft External Staff
2025-04-04T22:06:41.39+00:00 Hello Tiarnán Curran-Feeney,
We wanted to follow up on the issue you encountered. Please let us know if it's resolved or if you need further assistance.
-
VinodNallavade • 326 Reputation points
2025-04-05T04:44:29.8666667+00:00 I believe the concern here is about the delay, which is not just a few minutes as mentioned in the document. If the product team has any justification for why the function remained idle for four months, despite having blobs to process, it would be helpful to understand. Are we expected to manually trigger the function every 20 minutes to keep it active in the consumption plan, since it does not automatically come alive even after such a long idle period?
While the suggestion to switch to a different plan is fine, does this imply that we need to avoid using the consumption plan, which is supposed to be a serverless, pay-as-you-go offering?
-
VenkateshDodda-MSFT • 24,671 Reputation points • Microsoft Employee
2025-04-09T08:34:28.46+00:00 @Tiarnán Curran-Feeney I have reached out to you over private message please do check and shared the requested information to assist you further.
Here is the reference link on How to access & Data Privacy policy of private messages in Microsoft QnA.
-
Tiarnán Curran-Feeney • 0 Reputation points
2025-04-14T10:32:05.2233333+00:00 Yes, my concern is what VinodNallavade has indicated.
-
Tiarnán Curran-Feeney • 0 Reputation points
2025-04-16T08:51:56.14+00:00 Hi any update on this?
-
Tiarnán Curran-Feeney • 0 Reputation points
2025-04-16T10:01:14.05+00:00 Hi again, the following is a full summary of what has been discussed thus far. I thought it would be useful to summarise.
We have two function apps (one for staging and one for production). For the sake of this message I will call them:
- Staging App
- Production App
Both have a trigger of type Blob and are hosted on separate Consumption plans.
We noticed we weren't seeing any updates in our SQL database which suggested that the functions were not running.
We opened Staging App and we could see from the stats that it had no runs for at least 30 days. However, based on our database it was 4 months without running.
When we refreshed the function app invocations page, suddenly runs started appearing. It was rapidly processing all the blobs it had not processed in the last 4 months.
We similarly have the same issue on production with Production App. We were able to recreate the issue this morning. I opened the Invocations tab today (16th April 2025) and it indicated that Production App had not run since 26th March 2025.
Coincidentally, it is worth noting that the 26th March 2025 was the same day that I opened the Invocations tab of the Staging App.
I have refreshed the invocations and it is now rapidly processing a backlog of blobs. It has processed thousands of blobs within the last 30 minutes. Due to the size of the backlog it is still processing more blobs.
There is clearly an issue here with the function app not running. It is not clear to me why it requires the invocation tab to be opened in order to work.
The function should be triggering but is not. Is there anything you can do to assist?
It was previously mentioned that Consumption plan based function apps may have a delay of a few minutes before images get processed. However, the delay we are experiencing here is indefinite. It appears it does not begin processing until the function's Invocations tab is opened.
-
VenkateshDodda-MSFT • 24,671 Reputation points • Microsoft Employee
2025-04-16T14:50:11.7366667+00:00 @Tiarnán Curran-Feeney Thanks for sharing more details, I have reached out to you over private message please do check and help us with requested information to check and assist further on this.
-
Stephen Mallin • 26 Reputation points
2025-04-16T14:58:23.8533333+00:00 @Tiarnán Curran-Feeney I think the consumption plan is intended for applications with frequent-enough requests that the app doesn't idle. Your experience shows that could be made more clear in the documentation.
-
Tiarnán Curran-Feeney • 0 Reputation points
2025-04-24T10:53:33.9566667+00:00 Hi,
Has there been an update regarding this query?
-
VenkateshDodda-MSFT • 24,671 Reputation points • Microsoft Employee
2025-04-29T10:32:11.47+00:00 @Tiarnán Curran-Feeney Thanks for your patience on this. please do share the requested details over the private message to check further on this.
-
Tiarnán Curran-Feeney • 0 Reputation points
2025-04-30T09:09:42.5033333+00:00 I have emailed the details to you requested in the private message
-
VenkateshDodda-MSFT • 24,671 Reputation points • Microsoft Employee
2025-04-30T13:15:25.13+00:00 @Tiarnán Curran-Feeney Thanks for the details, will look into them and update you accordingly.
Sign in to comment