-
Notifications
You must be signed in to change notification settings - Fork 442
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Blob-triggered functions execute several times even though maxDequeueCount is set to 1 #8542
Comments
I imagine a workaround could look like this:
Tradeoffs:
This obviously is hacky. |
Another workaround
Obviously, the queue-triggered function must be authorized for blob access to do anything with its payload, however, in this way you don't need a function as handler. |
Unfortunately not, from the above I think the event grid option is still the ~okayest |
I am running into the same issue using the below configuration in my hosts.json file
|
Closing this now, since the way to go over Event Grid has not only proven to be stable and effective, but also more cost efficient in my scenario. Since my company deployed mandatory Advanced Threat Protection policies via Azure Defender, the transactions and traffic between the blob-triggered function and the storage account holding the blobs became ATP-billable. And since the blob-trigger polls excessively behind the scenes my cost skyrocketed. At the peak. adding almost 15 EUR/day in incremental cost. And this for only a handful of blob-triggered functions. Switching over to the Event Grid method cut that cost down by 98.8%. Also the cost for storage transactions (no polling naymore) went down by 97%. |
There is a separate section in the configuration specifically for blob triggers:
|
Please provide the following:
Repro steps
Blob-triggered functions under the hood work with queues. In the
host.json
there is a section to set the maximum dequeue count. This is respected for queue-triggered functions. It is not for blob-triggered functions. No equivalent section exists for theblobs
extension in the host.json.Expected behavior
Functions triggers once, completes either sucessfully or unsucessfully after one execution. No retries.
Actual behavior
In this case the function failed. There were 4 additional retries.
2022-07-12T15:58:41.180 [Information] Trigger Details: MessageId: 7191b747-4718-45c9-9c0e-90a687a37136, DequeueCount: 1, InsertedOn: 2022-07-12T15:58:39.000+00:00, BlobCreated: 2022-07-12T15:55:35.000+00:00, BlobLastModified: 2022-07-12T15:58:38.000+00:00
2022-07-12T15:58:45.937 [Information] Trigger Details: MessageId: 7191b747-4718-45c9-9c0e-90a687a37136, DequeueCount: 2, InsertedOn: 2022-07-12T15:58:39.000+00:00, BlobCreated: 2022-07-12T15:55:35.000+00:00, BlobLastModified: 2022-07-12T15:58:38.000+00:00
2022-07-12T15:58:46.620 [Information] Trigger Details: MessageId: 7191b747-4718-45c9-9c0e-90a687a37136, DequeueCount: 3, InsertedOn: 2022-07-12T15:58:39.000+00:00, BlobCreated: 2022-07-12T15:55:35.000+00:00, BlobLastModified: 2022-07-12T15:58:38.000+00:00
2022-07-12T15:58:47.332 [Information] Trigger Details: MessageId: 7191b747-4718-45c9-9c0e-90a687a37136, DequeueCount: 4, InsertedOn: 2022-07-12T15:58:39.000+00:00, BlobCreated: 2022-07-12T15:55:35.000+00:00, BlobLastModified: 2022-07-12T15:58:38.000+00:00
2022-07-12T15:58:48.040 [Information] Trigger Details: MessageId: 7191b747-4718-45c9-9c0e-90a687a37136, DequeueCount: 5, InsertedOn: 2022-07-12T15:58:39.000+00:00, BlobCreated: 2022-07-12T15:55:35.000+00:00, BlobLastModified: 2022-07-12T15:58:38.000+00:00
Executed 'cannot_disclose_publicly' (Failed, Id=2751b523-bd95-4752-a75a-c7d6af2c28d5, Duration=330ms)
Known workarounds
None.
The text was updated successfully, but these errors were encountered: