Azure / azure-functions-eventhubs-extension

Event Hubs extension for Azure Functions
MIT License
20 stars 26 forks source link

The lease ID specified did not match the lease ID for the blob #93

Closed chassq closed 2 years ago

chassq commented 3 years ago

Investigative information

We are seeing in the Application Insights Log the following. IT looks like a storage error but through teh Event Hubs so we are not sure where to log this. We looked at the Stack article (https://stackoverflow.com/questions/51602965/azure-eventhub-function-leaselostexception) but cannot tell if this should be happening or not and if it is an error or not. If this can be safely ignored then how can we suppress? The Severity Level is Information but the Telemetry Type is Exception.

Can someone in this forum reply to give us more direction?

Thanks!

Region: South Central US Instance: Premium Functions: deed5bf98ff970f06a8881b9f9ec9ee8094799c449d8fc0fb6040ef7ff1b5444 SDK version | azurefunctions: 3.0.15405.0 Sample Rate: 1 ProcessID: 8632

The lease ID specified did not match the lease ID for the blob. The lease ID specified did not match the lease ID for the blob.

Microsoft.WindowsAzure.Storage.Core.Executor.Executor+d__4`1.MoveNext

EventProcessorHost error (Action='Renewing Lease', HostName='82061f3d-beac-4ed8-83ed-c0a459767233', PartitionId='9'). An exception of type 'LeaseLostException' was thrown. This exception type is typically a result of Event Hub processor rebalancing or a transient error and can be safely ignored.

Microsoft.WindowsAzure.Storage, Version=9.3.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35

Microsoft.WindowsAzure.Storage.StorageException Microsoft.Azure.EventHubs.Processor.LeaseLostException: at Microsoft.Azure.EventHubs.Processor.AzureStorageCheckpointLeaseManager+d35.MoveNext (Microsoft.Azure.EventHubs.Processor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=7e34167dcc6d6d8c) Inner exception Microsoft.WindowsAzure.Storage.StorageException handled at Microsoft.Azure.EventHubs.Processor.AzureStorageCheckpointLeaseManager+d35.MoveNext: at Microsoft.WindowsAzure.Storage.Core.Executor.Executor+d4`1.MoveNext (Microsoft.WindowsAzure.Storage, Version=9.3.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35) at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e) at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e) at Microsoft.Azure.EventHubs.Processor.AzureStorageCheckpointLeaseManager+d35.MoveNext (Microsoft.Azure.EventHubs.Processor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=7e34167dcc6d6d8c)

Expected behavior

No Error Log as Exception. Maybe a warning?

v-anvari commented 3 years ago

Hi @chassq , We are looking into this issue, meanwhile can you provide us with more information regarding the project scenario. Can you give us the repro steps to understand the process that you are following. What exactly is the actual behavior that you are seeing

chassq commented 3 years ago

To be honest we are not 100% sure. We feel like it is due to an image processing system we have in place that will scale out using Event Hubs and Functions to meet demand for processing images into our system. We essentially write messages to event hubs when an image needs to be processed. That message is picked up by an azure function (premium) to process the image. The function processing brings the image from its external source (via url), validates and transforms the image to our standards and persists it onto our Azure Storage Blob containers.

v-anvari commented 3 years ago

@brettsam / @soninaren , any inputs ?

v-anvari commented 3 years ago

cc @alrod

Transferring this issue to event hubs extension for more insights.

This issue looks like a duplicate of https://github.com/Azure/azure-functions-eventhubs-extension/issues/42

alrod commented 2 years ago

This was fixed in: https://github.com/Azure/azure-functions-eventhubs-extension/commit/e263c0c09b360d7b8ab31c4767e58bc99a1e36ad#diff-806d2192f1f7fc61b73cc52707653e45f7c8fa7bd5f5ea36963fdb2c525fe0e6

Now it's logged as information.