Azure Service Bus - How to recover the connection / link dropped

John Wong Yek Hon 295 Reputation points
2026-07-01T14:33:57.58+00:00

The Background

My apps are currently suffer the connection / link dropped issue on the Azure Service Bus.

My apps are nodejs, deployed as Azure Container Apps, connect to Service Bus via the latest SDK. After running happily for long, recently we face issue on the stall receivers.

The receivers subscribe to different queues. We believe during the azure maintenance windows, the receivers suddenly no longer able receive message. And then it get auto recovered after around 15 minutes, without us doing anything.

The questions

  1. Is it common? and the SDK by default won't handle it?
  2. What's the best way to recover it, if we can't avoid some coding works? Could it be resolved by implement the recovery logic on the SDK's processError() function? Or must it be a watchdog to re-init the receivers? Or even other solutions?

Appreciate any expert advise.

Azure Service Bus
Azure Service Bus

An Azure service that provides cloud messaging as a service and hybrid integration.


1 answer

Sort by: Newest
  1. Pravallika KV 18,850 Reputation points Microsoft External Staff Moderator
    2026-07-01T14:42:08.4+00:00

    Hi @John Wong Yek Hon ,

    It sounds like you’re seeing Service Bus receivers stall / drop their AMQP link after some time, then recover automatically after ~15 minutes which lines up with the general idea that persistent connections/links can be closed during service-side changes (including maintenance) or due to inactivity/idle behavior, and that well-behaved clients should be able to recreate the link/connection and continue.

    Is this common? And does the SDK handle it by default?

    Yes, transient disconnections and reconnections are an expected part of working with persistent connections in Azure services. Routine maintenance and other interruptions can temporarily disconnect clients, and applications should be designed assuming connection interruptions will happen.

    For Azure Service Bus specifically, the service upgrades/restarts can cause momentary throttling, drops in incoming messages/requests, and the application being disconnected for a few seconds. When you’re using the SDK, the guidance says the retry policy is built in and active, and the application reconnects without significant impact.

    Also, with AMQP-based clients: some AMQP errors correspond to standard behaviors like link/connection closure and can be avoided by making send/receive calls in a way that uses the connection/link (which recreates them as needed).

    So in short: this isn’t unusual, and your “auto recover after ~15 minutes” strongly suggests you’re already hitting some transient condition, but you may want to confirm your client is creating/maintaining receivers in the “intended” resilient way.

    Best way to recover:

    1. Ensure your app handles transient connectivity failures with retry/reconnect

    Azure Service Bus reliability guidance emphasizes that client-side retry and reconnection logic is necessary when connections drop.

    If the stall is truly on “receivers stop receiving until the link is re-established,” the practical mitigations typically fall into two approaches (both are reasonable patterns):

    • Lightweight reconnect logic that recreates the receiver/link when you detect it’s stuck.
    • A watchdog (application-level) that reinitializes receivers if no progress is observed for some interval.
    1. Don’t rely only on processError() unless it triggers on the right failure mode

    However, conceptually:

    • If processError() fires when the link/connection is closed or errors, it can be a good place to trigger receiver/link recreation.
    • If the receiver “stalls” without surfacing an error, then a pure error handler may not run so a watchdog based on “no messages / no settle / no handler progress” might be more reliable.
    1. Check whether maintenance/restart symptoms match your timestamps

    During backend upgrades/restarts:

    • active/disconnected behavior can occur for a few seconds
    • logs may contain error messages
    • the app can disconnect briefly

    Your observation of ~15 minutes recovery suggests a longer client-side effect or an idle timeout/behavior, so it would be useful to correlate the incident time with any Azure Service Health / portal signals (see questions below).

    1. Confirm the SDK retry policy / defaults are enabled and not overridden. The Service Bus troubleshooting guidance states that when using the SDK, retry policy is built-in/active.
    2. Add a receiver health watchdog at the app layer (common resilient pattern):
      • Track “message received” or “message handler invoked” timestamps per subscription/receiver.
      • If nothing progresses for N minutes, close and recreate the receiver (or force link recreation depending on your SDK usage model).
    3. If you already have processError()/error callbacks, make them explicitly trigger the same recovery path as the watchdog (e.g., receiver recreation), so both “error” and “silent stall” are covered.
    4. Correlate with service health / any maintenance window using Azure Service Health.

    Hope this helps!


    If the resolution was helpful, kindly take a moment to click on User's imageand click on Yes for was this answer helpful. And, if you have any further query do let us know.

    Was this answer helpful?


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.