azure-sdk-for-python icon indicating copy to clipboard operation
azure-sdk-for-python copied to clipboard

Service Bus AMQP links are force disconnected after 10 minutes idle, regardless of keepalive

Open KieranBrantnerMagee opened this issue 6 years ago • 0 comments

  • Package Name: ServiceBus
  • Package Version: All versions (tested on 0.50.2)
  • Operating System: All OS's (Service-side root cause)
  • Python Version: All versions (tested on 3.8)

Describe the bug Service Bus Service force disconnects links after 10 minutes. Keep-alive does not mitigate this issue.

This can be noted within the following log: 2020-03-05 15:31:20,869 - INFO Received Link detach event: b'amqp:link:detach-forced' Link: b'sender-link-5f479322-233f-4739-bcb5-11ce50a08108' Description: b"The link 'G46:639413477:sender-link-5f479322-233f-4739-bcb5-11ce50a08108' is force detached. Code: publisher(link10362013). Details: AmqpMessagePublisher.IdleTimerExpired: Idle timeout: 00:10:00."

To Reproduce Steps to reproduce the behavior:

  1. Open a service bus client
  2. Get a queue (creating one if needed)
  3. Send a message to the queue.
  4. Get a receiver with keep_alive_interval = True
  5. Begin receiving from the queue by iterating over the receiver.
  6. Upon message receipt, sleep for 10 minutes.
  7. Attempt to complete the message. Observe that it fails.

Expected behavior The message should successfully complete.

Additional context This error occasionally correlates with another forced disconnect, on the CBS connection: 2020-03-05 15:36:31,113 - INFO CBS error occured on connection b'SBSender-f0883059-ac51-435a-96d8-80f91575411e'. 2020-03-05 15:36:31,113 - INFO b"<- [DETACH]* {1,true,* {amqp:connection:forced,The connection was inactive for more than the allowed 300000 milliseconds and is closed by container 'LinkTracker'. TrackingId:ecf50083184c4bf993a3d2534a521f9d_G46, SystemTracker:gateway7, Timestamp:2020-03-05T23:36:10,NULL}}"

KieranBrantnerMagee avatar Mar 06 '20 06:03 KieranBrantnerMagee