I have seen many cases where the blob trigger functions do not fire unless you explicitly visit the portal (function app blade). There might be several reasons for this issue, but I am going to mention the most common one.
When a Function App is running the host takes care of automatically receiving/polling for new events across all of our various trigger types (queues, event hubs, blobs, etc.). However, some differences arise based on the tier you're running in.
In our Dynamic SKUs, we have a service external to the Function App that is responsible for monitoring work and ensuring the Function App is running when it needs to be. When there is no work to perform (e.g., no queue messages, no new blobs, etc.), the Function App goes to sleep. It is the responsibility of the external service to ensure that it is woken up when work arrives.
In our Classic SKUs (Basic/Standard) this external monitor is not in the picture. The Function App must be run in Always On mode to keep it alive. This setting should be automatically configured to On for you when you create a Function App in a classic tier.
With all that background explained, if you're running in Dynamic SKU, things should "just work.” If you're running in a Classic SKU, make sure you have Always On enabled. That's a common issue people run into.
Recommendation: Though there is an inbuilt blob trigger function, it is best to set up an Event Grid subscription and trigger with Azure Functions when it comes to processing the blobs. The notifications are sent when blob operations take place. This also enables an improved experience when it comes to the speed Azure Functions will be able to react to those events. You need to create an Event Grid Trigger function and configure the “Event Grid Subscription URL” from Integrate tab of the function.
For information on the Event Grid trigger with Azure Functions:
Reacting to blob events using Event Grid:
Note: Event Grid subscription is only available in Storage V2.
Authored By - Sunny Dewangan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.