1

I have two blob triggers which I want to trigger on. One works and one does not!

I use Azure Storage Explorer to make sure blobs are uploaded to each blob, scanFiles will never trigger, and scanExports seem to always trigger.

Question: What can cause some blobs to not trigger an Azure function?

    [FunctionName("scanFiles")]
    public static async Task FilesScan([BlobTrigger("files/{newBlobName}", Connection = "BlobConnectionstring")]CloudBlockBlob newBlob, string newBlobName, ILogger log, ExecutionContext context)
    {
        await VirusScan(newBlob, newBlobName, log, context);
    }


    [FunctionName("scanExports")]
    public static async Task ExportsScan([BlobTrigger("exports/{newBlobName}", Connection = "BlobConnectionstring")]CloudBlockBlob newBlob, string newBlobName, ILogger log, ExecutionContext context)
    {
        await VirusScan(newBlob, newBlobName, log, context);
    }
Jeppe
  • 1,424
  • 2
  • 15
  • 36
  • Are both functions deployed identically and up and running? – Alex Sep 18 '19 at 12:58
  • They are not deployed currently. This happens during offline development in visual studio. They are defined in the same file, calling the same private function, so they are as identical as possible – Jeppe Sep 18 '19 at 13:03
  • Have you tried (As per Microsoft's recommendation) to put each Function into its own class and folder? – Alex Sep 18 '19 at 13:04
  • I have not, I'll try this tomorrow. I haven't taken notice of this suggestion before, where did you find it? – Jeppe Sep 18 '19 at 13:07
  • See: https://learn.microsoft.com/en-us/azure/azure-functions/functions-continuous-deployment . An excerpt: "Each subfolder contains the code for a separate function" – Alex Sep 18 '19 at 13:10
  • And you can confirm the container names exist and are named exactly as written? – jeffhollan Sep 18 '19 at 14:27
  • @jeffhollan yes, I have double checked the names and checked that the blobs appear via Azure storage explorer – Jeppe Sep 19 '19 at 03:48
  • @Alex Your link was for doing continuous delivery. But I tried it anyway, and there was unfortunately no change. – Jeppe Sep 19 '19 at 06:20
  • seems like something wrong with your blob container. because the code is the same. – Cindy Pau Sep 20 '19 at 06:37
  • Can you show the container of the blob Storage? – Cindy Pau Sep 20 '19 at 06:41
  • Try to recreate a container. and put the name in the first function. – Cindy Pau Sep 20 '19 at 06:45
  • I found that the issue only happens to one blob container. The only difference is its size (1.66 GB), but I do not know how to deal with this. I can show and navigate all the container both in the Azure portal and in Azure Storage Explorer The function works with all my other containers, which are all below 550 MB in size (I'm assuming now the issue it with size) – Jeppe Sep 20 '19 at 07:39
  • @Jeppe, can you make sure only one azure function consume the blob container? – Ivan Glasenberg Sep 20 '19 at 07:50
  • There are no other functions triggering on the blob container. – Jeppe Sep 20 '19 at 08:30

1 Answers1

0

I found that the issue was because one of the blobs were considered High scale, which triggers this bug and also makes the host process kill itself when run locally (see this issue)

Jeppe
  • 1,424
  • 2
  • 15
  • 36