问题
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.
回答1:
Lock duration of a message is configurable if you navigate to Service Bus -> Queue -> Properties. Consider extending it longer than 5 minutes.
回答2:
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
来源:https://stackoverflow.com/questions/42432426/azure-logic-app-fails-to-complete-the-message-in-a-queue