ThomasArdal
ThomasArdal

Reputation: 5229

Azure Function with serviceBusTrigger stops receiving messages

I have am Azure Function configured with a servieBusTrigger to receive messages from a topic subscription on Azure Serivce Bus. The function have been running fine for days, but this morning I noticed a lot of messages on the subscription. It turns out, that my Function no longer receives messages from the queue.

I've checked the queue to ensure that the messages are not in the dead letter queue. They are not. I have logging in place in my Function and no log statements are found (which I didn't expect since the messages are never processed). I've checked the log files on Kudu (`LogFiles\Application\Functions\Function\MyFunction). It is empty and I did enable application logging through the Portal.

Here's my function.json:

{
  "disabled": false,
  "bindings": [
    {
      "name": "mySbMsg",
      "type": "serviceBusTrigger",
      "direction": "in",
      "topicName": "tasks-v1",
      "subscriptionName": "errormail-v1",
      "connection": "connection",
      "accessRights": "Manage"
    }
  ]
}

As I wrote earlier, the Function did work fine for days. I'm running on the consumption plan, why always on shouldn't be an issue.

Any ideas to how to debug this?

UPDATE: For future reference, we updated to compiled functions which fixes the problem (which makes sense since the bug are in Roslyn).

Upvotes: 0

Views: 857

Answers (1)

Matt Mason
Matt Mason

Reputation: 2726

It appears your function ran into this bug with roslyn compilation which is solved via restart: https://github.com/Azure/azure-webjobs-sdk-script/issues/999

I saw this error in your function app logs:

2017-03-28 23:14:11.6306121 Cannot enqueue data after PromiseNotToEnqueue.

This is a sporadic issue, but if you want a workaround you can use precompiled functions.

Upvotes: 1

Related Questions