title: Azure Functions: Error: 409 LeaseIdMismatchWithLeaseOperation (Listener)
body: <p>We are using Azure Functions (V2 – Consumption Plan). Occasionally (Perhaps once or twice a day) we get a series of the below error.</p>
  <p>I have tried Googling it to figure out how to solve it – but for the time being with no success.</p>
  <p>Any idea how I could solve it? Are there errors something I should be concerned about – or is it normal to receive them?</p>
  <pre><code>Singleton lock renewal failed for blob 'xxxxxxx/xxxxx.xxxx.RunAsync.Listener' with error code 409: LeaseIdMismatchWithLeaseOperation. The last successful renewal completed at 2020-07-24T05:00:16.732Z (33347 milliseconds ago) with a duration of 4 milliseconds. The lease period was 15000 milliseconds.
  </code></pre>
  <p>Accompanied with this error</p>
  <pre><code>Exception: Microsoft.Azure.Storage.StorageException: The lease ID specified did not match the lease ID for the blob.
  at Microsoft.Azure.Storage.Core.Executor.Executor.ExecuteAsync[T](RESTCommand`1 cmd, IRetryPolicy policy, OperationContext operationContext, CancellationToken token)
  at Microsoft.Azure.WebJobs.Host.StorageBaseDistributedLockManager.SingletonLockHandle.RenewAsync(ILogger logger, CancellationToken cancellationToken) in C:\projects\azure-webjobs-sdk-rqm4t\src\Microsoft.Azure.WebJobs.Host.Storage\Singleton\BlobLeaseDistributedLockManager.cs:line 348
  at Microsoft.Azure.WebJobs.Host.SingletonManager.RenewLeaseCommand.ExecuteAsync(CancellationToken cancellationToken) in C:\projects\azure-webjobs-sdk-rqm4t\src\Microsoft.Azure.WebJobs.Host\Singleton\SingletonManager.cs:line 332
  at Microsoft.Azure.WebJobs.Host.Timers.TaskSeriesTimer.RunAsync(CancellationToken cancellationToken) in C:\projects\azure-webjobs-sdk-rqm4t\src\Microsoft.Azure.WebJobs.Host\Timers\TaskSeriesTimer.cs:line 147
  Request Information
  RequestID:708f6f2f-d01e-013a-1677-xxxxxxx
  RequestDate:Fri, 24 Jul 2020 05:00:48 GMT
  StatusMessage:The lease ID specified did not match the lease ID for the blob.
  ErrorCode:LeaseIdMismatchWithLeaseOperation
  ErrorMessage:The lease ID specified did not match the lease ID for the blob. RequestId:708f6f2f-d01e-013a-1677-xxxxx Time:2020-07-24T05:00:48.4767302Z
  </code></pre>