azure-event-hubs-go icon indicating copy to clipboard operation
azure-event-hubs-go copied to clipboard

Go routine leak in azure-event-hubs-go/v2/eph.(*leasedReceiver).Run

Open jonnylangefeld opened this issue 6 years ago • 5 comments

Expected Behavior

Amount of go routines for Go routine leak in azure-event-hubs-go/v2/eph.(*leasedReceiver).Run.func1 doesn't increase over time

Actual Behavior

the go routines are leaking and memory footprint grows

Analysis

This is basically the same issue as described ind #136. Here are two screenshots taken 1:40 hrs apart from each other indicating a significant increase of go routines for the described function:

Screen Shot 2019-09-03 at 11 38 02 AM

Screen Shot 2019-09-03 at 1 19 17 PM

Environment

  • OS: linux
  • Go version: 12.9
  • Version of Library: 2.0.2

jonnylangefeld avatar Sep 04 '19 17:09 jonnylangefeld

@jonnylangefeld do you call (*leasedReceiver).Close for each lr?

gavinfish avatar Sep 06 '19 06:09 gavinfish

@gavinfish We don't. We're using the almost exact code as in the readme for EPH which doesn't manually close the leasecheckpointer at all. Our setup differs only in that we write the incoming events to a channel to be processed concurrently later on. The application runs continuously as there will be always events in the EventHubs namespace in our case. Does this answer your question?

elsesiy avatar Sep 06 '19 07:09 elsesiy

I'm experiencing the same behavior in my production setup. Is this resolved?

hoenirvili avatar Sep 18 '19 07:09 hoenirvili

are there any plans to fix this?

birdayz avatar Mar 01 '20 08:03 birdayz

We ended up migrating to shopify/sarama and using the Kafka interface. The library is not only much more efficient but also well maintained. Maybe that works for you too?

elsesiy avatar Mar 01 '20 17:03 elsesiy