Azure / Azure/azure-functions-host

Blob trigger delay and issues

Open
#9,880 13 comments 0 reactions 1 assignee Assigned to @raushan2998 View on GitHub
bot: do not close Needs: Attention :wave:
Dominant language
C#
Stars
2k
Forks
482
Avg merge
2d 12h
Merged PRs (30d)
38

Description

We developed an Azure Function in python which is blob triggered on certain blobs. It run on a service plan.

We sometimes encounter very weird behavior of blob triggers.

**Delay**
First, there is sometimes a very huge delay between blob creation and trigger insertion. Here is a Trigger log :
```
Trigger Details: MessageId: , DequeueCount: 1, InsertedOn: 2024-02-14T12:26:28.000+00:00, BlobCreated: 2024-02-14T06:16:26.000+00:00, BlobLastModified: 2024-02-14T06:16:27.000+00:00
```
As one can see, the blob was created and last modified at 06:16, and the trigger append at 12:26pm. I can't find in the documentation any reason for such a delay.

**Really weird requeue behavior**
When function fails (for some reason that are not related to this question), the requeue behavior is not working as expected. Here are the Trigger details that I can find in my logs :
```
Trigger Details: MessageId: 399ec....identical, DequeueCount: 1, InsertedOn: 2024-02-13T11:25:32.000+00:00, BlobCreated: 2024-02-13T10:31:30.000+00:00, BlobLastModified: 2024-02-13T10:31:31.000+00:00
Trigger Details: MessageId: 399ec....identical, DequeueCount: 2, InsertedOn: 2024-02-13T11:25:32.000+00:00, BlobCreated: 2024-02-13T10:31:30.000+00:00, BlobLastModified: 2024-02-13T10:31:31.000+00:00
Trigger Details: MessageId: 399ec....identical, DequeueCount: 2, InsertedOn: 2024-02-13T11:25:32.000+00:00, BlobCreated: 2024-02-13T10:31:30.000+00:00, BlobLastModified: 2024-02-13T10:31:31.000+00:00
Trigger Details: MessageId: 399ec....identical, DequeueCount: 4, InsertedOn: 2024-02-13T11:25:32.000+00:00, BlobCreated: 2024-02-13T10:31:30.000+00:00, BlobLastModified: 2024-02-13T10:31:31.000+00:00
Trigger Details: MessageId: 399ec....identical, DequeueCount: 3, InsertedOn: 2024-02-13T11:25:32.000+00:00, BlobCreated: 2024-02-13T10:31:30.000+00:00, BlobLastModified: 2024-02-13T10:31:31.000+00:00
Trigger Details: MessageId: 399ec....identical, DequeueCount: 3, InsertedOn: 2024-02-13T11:25:32.000+00:00, BlobCreated: 2024-02-13T10:31:30.000+00:00, BlobLastModified: 2024-02-13T10:31:31.000+00:00
Trigger Details: MessageId: 399ec....identical, DequeueCount: 3, InsertedOn: 2024-02-13T11:25:32.000+00:00, BlobCreated: 2024-02-13T10:31:30.000+00:00, BlobLastModified: 2024-02-13T10:31:31.000+00:00
Trigger Details: MessageId: 399ec....identical, DequeueCount: 4, InsertedOn: 2024-02-13T11:25:32.000+00:00, BlobCreated: 2024-02-13T10:31:30.000+00:00, BlobLastModified: 2024-02-13T10:31:31.000+00:00
Trigger Details: MessageId: 399ec....identical, DequeueCount: 4, InsertedOn: 2024-02-13T11:25:32.000+00:00, BlobCreated: 2024-02-13T10:31:30.000+00:00, BlobLastModified: 2024-02-13T10:31:31.000+00:00
Trigger Details: MessageId: 399ec....identical, DequeueCount: 5, InsertedOn: 2024-02-13T11:25:32.000+00:00, BlobCreated: 2024-02-13T10:31:30.000+00:00, BlobLastModified: 2024-02-13T10:31:31.000+00:00
Trigger Details: MessageId: 399ec....identical, DequeueCount: 5, InsertedOn: 2024-02-13T11:25:32.000+00:00, BlobCreated: 2024-02-13T10:31:30.000+00:00, BlobLastModified: 2024-02-13T10:31:31.000+00:00
Trigger Details: MessageId: 399ec....identical, DequeueCount: 5, InsertedOn: 2024-02-13T11:25:32.000+00:00, BlobCreated: 2024-02-13T10:31:30.000+00:00, BlobLastModified: 2024-02-13T10:31:31.000+00:00
Trigger Details: MessageId: 399ec....identical, DequeueCount: 5, InsertedOn: 2024-02-13T11:25:32.000+00:00, BlobCreated: 2024-02-13T10:31:30.000+00:00, BlobLastModified: 2024-02-13T10:31:31.000+00:00
```

What I find very weird is that, DequeueCount is not 1, 2, 3, 4, 5 but 1, 2, 2, 3, 3, 3, etc. This make the function try 13 times instead of 5 times which is the MaxDequeueCount

#### Investigative information

Please provide the following:

- Timestamp: 2024/02/14
- Function App version: 4
- Function App name: I don't wish to disclose publicly
- Function name(s) (as appropriate):
- Invocation ID: 47437051-65f4-48e4-a6bf-dc57ce04edae
- Region: France Central

#### Repro steps
I'm not sure how to reproduce.

#### Expected behavior
- Delay of a few seconds / minutes
- Linear dequeue

#### Actual behavior
- Delay of a few hours
- Dequeue count 1, 2, 2, 3, 3, 3, 4, 4, etc for same function retry

Thanks

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.