Skip to content

[azservicebus] Memory leak when receiving messages #22157

Closed
@gkampitakis

Description

@gkampitakis

Bug Report

  • Package in question azure-sdk-for-go/sdk/messaging/azservicebus
  • SDK version v1.5.0
  • go version 1.21
  • What happened?

We are trying to move away from the deprecated azure sdk for service bus https://github.com/Azure/azure-service-bus-go and use e the new in one of our services. This service is heavily reading on messages from a Service Bus Queue. We are noticing an increasing usage of memory.

Screenshot 2023-12-18 at 12 38 00

Also from profiling data we can see that the Heap size increase is happening at go-ampq code

Screenshot 2023-12-18 at 12 41 48

  • What did you expect or want to happen?

I would expect the new SDK to have a different memory footprint (either higher or lower memory consumption) but after some time i was expecting the memory usage of the service to be stable as before and not increasing time over time.

  • How can we reproduce it?

Not sure how easy it is, as we need to leave the service running for a couple of days to start seeing the increase in memory usage.

  • Anything we should know about your environment.

Data shared above are from staging environment. I am expecting bigger usage on a prod environment with much higher traffic.

Our setup is we are using a number of worker goroutines each one receiving messages from a client.Receiver in parallel.

Metadata

Metadata

Labels

ClientThis issue points to a problem in the data-plane of the library.Service Buscustomer-reportedIssues that are reported by GitHub users external to the Azure organization.needs-team-attentionWorkflow: This issue needs attention from Azure service team or SDK team

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions