Azure PubSub Connection Timeout (ETIMEDOUT)

Ashir Baig 0 Reputation points
2026-01-22T08:36:42.56+00:00

I have provisioned an Azure Web PubSub service by following the official Azure documentation. The service has been configured using the JSON settings provided below. In addition, a secondary replica has been set up successfully, and its configuration details are also included.

Despite this setup, we are consistently encountering a connection timeout error (ETIMEDOUT) when attempting to connect to the Azure Web PubSub service. The issue occurs during client connection attempts and impacts message delivery.

This service is actively used in our production environment, and the timeout is causing service disruption.
Additional Technical Context:

  • Azure Web PubSub Service is deployed and running
  • Primary and secondary replicas are enabled
  • Error occurs during client connection attempts to the service endpoint
  • Error message observed: ETIMEDOUT
  • Configuration has been validated against Azure documentation
  • Application server load is within normal operating limits (CPU, memory, and network utilization are stable and not saturated at the time the issue occurs)

Please let us know if additional details required

Edited PII information

Azure Web PubSub
Azure Web PubSub

An Azure service that provides real-time messaging for web applications using WebSockets and the publish-subscribe pattern.


2 answers

Sort by: Most helpful
  1. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more

  2. AI answer

    2026-01-22T08:36:58.24+00:00

    The connection timeout error (ETIMEDOUT) you are experiencing when trying to connect to the Azure Web PubSub service can be caused by several factors. Here are some troubleshooting steps you can take to address this issue:

    1. Verify Connection String: Ensure that the connection string or fully qualified domain name specified when creating the client is correct. Any errors in the connection string can lead to timeouts.
    2. Firewall and Port Permissions: Check the firewall settings in your hosting environment to ensure that the necessary ports for Azure Web PubSub are open. The service typically uses ports 443 for WebSockets and 80 for HTTP.
    3. Network Configuration: Ensure that your network is not blocking specific IP addresses that are required for Azure Web PubSub. You may need to allowlist certain IPs to ensure connectivity.
    4. Proxy Configuration: If your application is behind a proxy, verify that the proxy settings are correctly configured. An intercepting proxy can cause SSL handshake failures, leading to connection timeouts.
    5. Service Status: Check the Azure service status to see if there are any ongoing issues or maintenance that could affect connectivity.
    6. Resource Logs: Utilize resource logs to identify any unexpected disconnection events or connection limits being reached. Look for entries like Connection count reaches limit or other relevant messages that could indicate issues.
    7. Client Performance: Ensure that the client is capable of handling the current traffic load. If clients are not able to process messages quickly enough, it may lead to timeouts.

    By following these steps, you should be able to identify the root cause of the ETIMEDOUT error and take appropriate action to resolve it.


    References:

    AI-generated content may be incorrect. Read our transparency notes for more information.

    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.