Waqar Haider
Waqar Haider

Reputation: 119

Azure logic App - Fails to complete the message in a queue

I have a queue and couple of Azure functions in Azure Logic App.

An Azure function takes 5 minutes and when the event "Complete the message in queue" runs in logic app, it fails. Following is the output.

{
  "status": 400,
  "message": "Failed to complete the message with the lock token '{the-guid}'. The lock on the message has been lost.",
  "source": "127.0.0.1"
}

It was not happening a week ago.

Upvotes: 2

Views: 5568

Answers (3)

Bashar Abu Shamaa
Bashar Abu Shamaa

Reputation: 2029

Now you can change it from the Overview: enter image description here

Upvotes: 1

Tom Sun
Tom Sun

Reputation: 24549

The max Lock duration of ServiceBus queue is 5 minutes, we can't extend it longer than 5 minutes currently. So if the azure function takes 5 minutes that event "Complete the message in queue", it will fail to complete the message.

Additional :If your function is on a Consumption plan, it is not allow to run a function more than 5 minutes. More info please refer to issue

enter image description here

Upvotes: 5

Derek Li
Derek Li

Reputation: 3111

Lock duration of a message is configurable if you navigate to Service Bus -> Queue -> Properties. Consider extending it longer than 5 minutes.

Upvotes: 2

Related Questions