Intermittent ETIMEDOUT and ServiceBusError while sending messages to Azure Service Bus Standard Tier Queue

Md Farhaan 0 Reputation points
2025-07-09T07:58:39.46+00:00

Hi Team,

We are encountering intermittent issues while sending messages to an Azure Service Bus Standard Tier queue (we are only using queues, no topics). Occasionally, we receive the following error: "ServiceBusError: [connection-1] Sender 'queuename-queueId' with address 'queuename', was not able to send the message right now, due to operation timeout."

Alongside this, we sometimes also see a low-level network error: "ETIMEDOUT: connect ETIMEDOUT <ip>". We are using the @azure/service-bus Node.js SDK in a production environment. This issue does not occur consistently but appears sometimes . We would like to understand what typically causes such timeouts in the Standard tier, whether it could be related to retry settings, network instability, or connection pooling, and if there are any best practices or configurations (such as for retries or connection reuse) to help avoid or mitigate this issue. Any guidance would be appreciated.

Also would like to understand service bus rate limits per second. I feel we might be crossing it which is causing the issue.

Thanks

Azure Service Bus
Azure Service Bus
An Azure service that provides cloud messaging as a service and hybrid integration.
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Sai Prabhu Naveen Parimi 3,470 Reputation points Microsoft External Staff Moderator
    2025-07-09T08:20:58.3866667+00:00

    @Md Farhaan

    The errors you're seeing, such as the ServiceBusError and the ETIMEDOUT network error, can indeed be caused by a number of factors.

    Here are a few things to consider and some steps to mitigate the issue:

    Network Instability: The ETIMEDOUT error often points to network issues. Ensure that your network connection is stable and check for any potential firewall rules that might be affecting connectivity.

    Timeouts: Check the MessagingFactorySettings.OperationTimeout in your Service Bus configuration. If the operation is taking longer than this setting, it will throw a TimeoutException. It might help to increase this timeout duration if you are performing larger batch operations.

    Connection Limits: The default connection limit may be reached if your application is creating too many concurrent connections. You can check the ServicePointManager.DefaultConnectionLimit value and adjust it if necessary.

    Retries and Backoff: Ensure that you're implementing a robust retry logic with exponential backoff in your messaging code. This is important for transient failures and helps in avoiding repeated immediate retries that could lead to throttling or timeout issues.

    Throttling: Since you're concerned about hitting Service Bus rate limits, consider monitoring the metrics in the Azure portal for your Service Bus namespace. Make sure to check the throttling policies and understand the load your application is generating. If throttling is a frequent issue, moving to a Premium tier might provide the required resources.

    Best Practices Documentation: Incorporate information from the Azure documentation on Service Bus messaging exceptions and throttling operations for further insights.


Your answer

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