Azure Blob storage trigger doesn't fire for large blobs

Mehdi Samsami 1 Reputation point
2022-04-17T11:25:43.297+00:00

I have a blob-triggered Azure Function. It perfectly works with blobs up to 1.1-1.2GB (and less). But when I upload a 1.8GB file to the same container, the function doesn't get triggered at all. There are no invocations after waiting for even 1-2 hours after uploading the file.

Any idea why this happens? Is there a limitation to the blob size based on the triggering action is performed?

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

5 answers

Sort by: Most helpful
  1. Takahito Iwasa 4,841 Reputation points MVP
    2022-04-17T22:35:20.607+00:00

    Hi, @Mehdi Samsami

    I have tried.

    I created the default Azure Blob Storage trigger function (C# 6.0, Windows, consumption plan) according to the following, created a 2.0GB dummy file and uploaded it, and it worked.

    https://learn.microsoft.com/en-us/azure/azure-functions/functions-bindings-storage-blob-trigger?tabs=in-process%2Cextensionv5&pivots=programming-language-csharp

       iwasa.takahito@hoge 0418blob % ls -lh  
       total 12403680  
       \-rw-------  1 iwasa.takahito  staff   2.0G  4 18 07:24 hoge2000mb  
         
       iwasa.takahito@hoge 0418blob % az storage blob upload --account-name iwasa0418uploadstorage --container-name hoge --name hoge2000mb --file hoge2000mb  
         
       :  
         
       In addition, setting the corresponding environment variables can avoid inputting credentials in your command. Please use --help to get more information about environment variable usage.  
       Finished[#############################################################]  100.0000%  
       {  
         "etag": "\"0x8DA20C1B6A71253\"",  
         "lastModified": "2022-04-17T22:29:19+00:00"  
       }  
    
    
    
       2022-04-17T22:29:28.744 [Information] Executing 'Functions.BlobTrigger1' (Reason='New blob detected: hoge/hoge2000mb', Id=d31d51d0-a5d8-4cb1-8edc-23ec51619107)  
       2022-04-17T22:29:28.744 [Information] Trigger Details: MessageId: ccd31c69-dc65-4a73-b55b-b86ae01f2de4, DequeueCount: 1, InsertionTime: 2022-04-17T22:29:28.000+00:00, BlobCreated: 2022-04-17T22:29:19.000+00:00, BlobLastModified: 2022-04-17T22:29:19.000+00:00  
       2022-04-17T22:29:28.745 [Information] C# Blob trigger function Processed blobName:hoge2000mbSize: 2097152000 Bytes  
       2022-04-17T22:29:28.745 [Information] Executed 'Functions.BlobTrigger1' (Succeeded, Id=d31d51d0-a5d8-4cb1-8edc-23ec51619107, Duration=7ms)  
    

    We need to find the conditions for reproducing the phenomenon.
    Can you see the difference between the default function and your workload and find the reproducibility conditions?

    1 person found this answer helpful.

  2. MughundhanRaveendran-MSFT 12,421 Reputation points
    2022-04-20T13:04:59.29+00:00
    1 person found this answer helpful.
    0 comments No comments

  3. Takahito Iwasa 4,841 Reputation points MVP
    2022-04-17T11:46:03.41+00:00

    Hi, @Mehdi Samsami

    I'm looking for documentation on trigger conditions now, but the Azure Functions Consumption plan has a memory size limit of 1.5GB.

    https://learn.microsoft.com/en-us/azure/azure-functions/functions-bindings-storage-blob-trigger?tabs=in-process%2Cextensionv5&pivots=programming-language-csharp#concurrency-and-memory-usage

    You can take advantage of more memory by changing to the App Service plan, so it may be resolved if the trigger condition is related to this limitation.


  4. Mehdi Samsami 1 Reputation point
    2022-04-18T05:51:54.16+00:00

    Hi @Takahito Iwasa

    Thanks a lot for trying to reproduce the issue!

    Here are the configurations I use for the Azure Function:

    • Stack: Python 3.8
    • OS: Linux
    • Runtime version: ~3 (I also tested ~4)
    • App Service Plan: EP3

    function.json:

       json  
       {  
         "scriptFile": "__init__.py",  
         "bindings": [  
           {  
             "name": "myblob",  
             "type": "blobTrigger",  
             "direction": "in",  
             "path": "daily-data/{name}",  
             "connection": "storagesimulationprod_STORAGE"  
           }  
         ]  
       }  
    

    host.json:

       json  
       {  
         "version": "2.0",  
         "logging": {  
           "applicationInsights": {  
             "samplingSettings": {  
               "isEnabled": true,  
               "excludedTypes": "Request"  
             }  
           }  
         },  
         "extensionBundle": {  
           "id": "Microsoft.Azure.Functions.ExtensionBundle",  
           "version": "[2.*, 3.0.0)"  
         },  
         "functionTimeout": -1  
       }  
    

    Also, now that I look at the Metrics details, I see that the function has been triggered, but nothing has happened. There are no invocation logs corresponding to these executions, which I haven't been noticed since now:

    193765-image.png


  5. Phil Lodwick 1 Reputation point
    2022-12-20T18:10:58.867+00:00

    @Mehdi Samsami ,

    Did you ever find the root cause? I am seeing similar behavior and am wondering if I need to switch to an Event Grid notification.