Skip to content

Connection closed with error: [b'amqp:connection:forced', b"The connection was inactive for more than the allowed 240000 milliseconds and is closed by container '0d2b8a9ef31548df9b32154da33cc1cd_G21'.", None] #41220

Open
@breinlni

Description

@breinlni
  • Package Name: azure.eventhub
  • Package Version: 5.15.0
  • Operating System: Linux
  • Python Version: 3.11.4

Describe the bug
Hi there, we have a python service running that publishes some events to an event hub every few minutes. We're intercepting external logs and we're getting the following warning from time to time:

"Connection closed with error: [b'amqp:connection:forced', b"The connection was inactive for more than the allowed 240000 milliseconds and is closed by container '0d2b8a9ef31548df9b32154da33cc1cd_G21'.", None]"

Now, it does not seem like we have any problems with publishing events, so we assume that the connection is automatically re-created again in the background after closing it. Is that right?
We still would like to understand where this warning is coming from.
According to this documentation the idle timeout is "...by default None, meaning that the client will not shutdown due to inactivity unless initiated by the service."

To Reproduce
Steps to reproduce the behavior:

We are creating the producer client when we start our server (FastAPI))

producer = EventHubProducerClient(
    fully_qualified_namespace=settings.EVENT_HUB_FULLY_QUALIFIED_NAMESPACE,
    eventhub_name=settings.EVENT_HUB_NAME,
    credential=credential,
)

Expected behavior
If idle_timeout is not set, the connection should not time out

Screenshots

Additional context
We saw a couple of other issues related to that. But it's not clear how it answers our question:

Metadata

Metadata

Labels

ClientThis issue points to a problem in the data-plane of the library.Event HubsMessagingMessaging crewcustomer-reportedIssues that are reported by GitHub users external to the Azure organization.issue-addressedWorkflow: The Azure SDK team believes it to be addressed and ready to close.questionThe issue doesn't require a change to the product in order to be resolved. Most issues start as that

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions