The blob trigger in azure function doesn't trigger every time

Tony Johansson 40 Reputation points
2023-05-30T21:16:06.1633333+00:00

Hello,

The azure function is consumtion based.

We have a customer that is using WinSCP and sftp to write an xml file in the blob container.
The customer write the xml file about every 30 minutes.
The problem is that the azure function doesn't react every time an xml file is written to the blob container. When I tested myself with WinSCP or by upload in portal it works most of the times. So sometimes I can see a blob(file) in the blob container that has been there for 20 minutes or much longer. So my question how can I find the reason why it doesn't work every time. So when the azure function react to a new blob it works fine. It must be reliable so I can trust that the dropped file will be processed.

To force the azure function to start processing a file that has been in the storage container for a long time I can click the url for the function but this is a useless solution.

If I can't find a solution to this problem I must find another solution.

Thanks in advance

//Tony Johansson

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

1 answer

Sort by: Most helpful
  1. navba-MSFT 20,375 Reputation points Microsoft Employee
    2023-05-31T13:03:34.01+00:00

    @Tony Johansson Welcome to Microsoft Q&A Forum, Thank you for posting your query here!

    I understand that you are expecting a most reliable solution to trigger the Azure Function upon Blob Upload / write via BlobTrigger.

    Please note that our documentation clearly mentions that if you are executing your function code based on changes to blobs in a storage container, and the Blob storage trigger might not be the best option.
    See here.

    If you require a faster or more reliable blob processing, consider creating a queue message when the blob is uploaded. Then use a queue trigger instead of Blob Trigger to process the blob.

    Another option is to use the ***EventGrid .

    This*** article explains the detailed action plan with various strategies that can be followed to achieve a faster and reliable blob processing. Hope this helps.

    Please do not forget to "Accept the answer” and “up-vote” wherever the information provided helps you.