0

I have an Azure Function app that two of the functions are listening to an EventHub and get triggered when a new event arrives in the hub. Both functions have their own consumer groups.

one of the functions starts a process which could be pretty intensive and are fulfilled by other functions in the app.

The FunctionApp is V2 consumption-based.

As long as there is only a single instance of FunctionApp, everything is fine but when it scales, from time to time I get the following error which is apparently result of having several functions listening to an eventhub within the same consumer-group.

Microsoft.Azure.EventHubs.ReceiverDisconnectedException

New receiver with higher epoch of '71' is created hence current receiver with epoch '70' is getting disconnected. If you are recreating the receiver, make sure a higher epoch is used. TrackingId:7cc543c80006767c0050b4775s42e306_G41_B87, SystemTracker:eventhubnamespace:eventhub:eventhub-name~8191|function-name, Timestamp:2019-08-01T13:20:38

Any solution or workaround to avoid it?

Community
  • 1
  • 1
Mori
  • 2,484
  • 5
  • 28
  • 45
  • I don't know if this might be just the usual behaviour. Are you seeing any messages getting lost because of this? You might be better of filing an issue on the Functions github: https://github.com/Azure/azure-functions-host/issues – silent Aug 05 '19 at 17:44
  • @silent At least, I have not yet discovered any lost messages but such errors trigger alarm and we receive error emails from Application Insights which is so annoying! – Mori Aug 06 '19 at 21:00

1 Answers1

0

See this response for the explanation of what this error means (TLDR: It's normal): What is causing Azure Event Hubs ReceiverDisconnectedException/LeaseLostException?.

What version of the EventHubs extension are you using? I believe we made a change to make these errors quieter in Functions in a recent release.

brettsam
  • 2,702
  • 1
  • 15
  • 24
  • Thanks Brett for the explanations! The function was written with node.js and here is runtime version "2.0.12641.0 (~2)". And this is the extensionBundle version: "[1.*, 2.0.0)". The thing is the exceptions trigger AppInsights alerts and support team receive emails! On the other hand I am not sure if it is safe to exclude such exceptions in alert rules in appInsight! – Mori Aug 28 '19 at 17:53