Function blob trigger stops firing

Johan Runsten 5 Reputation points
2023-12-22T08:51:22.8666667+00:00

Hi,

I'm experiencing a quite known issue it seems, where my (.net 7 isolated) function which has a blob trigger stops firing on blob events after a period of time (days?). When I visit the portal to investigate the function kicks in and triggers on the event. There are no exceptions or traces in the logs up until this time.

There are a number of closed GitHub issues and "solved" threads on this subject out there but they provide little to no explanation or actual workarounds or fixes that I can see, except maybe "switch to event grid triggers".

The support assistant in Azure tells me this however:

"This validator checks if other Function Apps have the same event source - this can cause missed executions or unexpected behavior" "Another Function App is pulling messages from the same queue. If two Azure Function Apps are triggered from the same queue, one Azure Function App may appear to be idle."

I do have 2 function apps with a number of functions in them, they have either queue triggers or blob triggers on them on the same storage account but they all specify different queues or containers.

  • Are they all using the same queue for the trigger mechanism, is that what this text is implying? Is this a known limitation? I've never seen it mentioned anywhere else that this might be a problem.
  • Are blob trigger events guaranteed to be delivered at least once? I have seen indications in the documentation that it might be on a "best effort" basis..
  • Is switching to event grid always a better choice if the reliability of blob triggers is questionable?

Thank you.

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
5,908 questions
Azure Blob Storage
Azure Blob Storage
An Azure service that stores unstructured data in the cloud as blobs.
3,192 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. MayankBargali-MSFT 70,936 Reputation points Moderator
    2023-12-26T16:53:54.77+00:00

    @Johan Runsten Thanks for reaching out and apology for the inconvenience due to this issue.

    It would not be possible to pinpoint the root cause, and this would need to be reviewed from the backend logs and I believe you have already reached out to us over one on one support request and yes this could be one of the reasons where it may have missed execution. The same is documented here.

    For your 1st and 2nd query the document covers. It's the best effort and it may be missed. Yes, switching to event grid would be better option as documented.

    Polling works as a hybrid between inspecting logs and running periodic container scans. Blobs are scanned in groups of 10,000 at a time with a continuation token used between intervals. If your function app is on the Consumption plan, there can be up to a 10-minute delay in processing new blobs if a function app has gone idle. Warning Storage logs are created on a "best effort" basis. There's no guarantee that all events are captured. Under some conditions, logs may be missed. If you require faster or more reliable blob processing, you should instead implement one of the following strategies:

    • Change your binding definition to consume blob events instead of polling the container. You can do this in one of two ways:
    • Consider creating a queue message when you create the blob. Then use a queue trigger instead of a blob trigger to process the blob.
    • Switch your hosting to use an App Service plan with Always On enabled, which may result in increased costs.
    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.