Azure SignalR: Notifications not consistently delivered despite active client connection and correct targeting

Manimala Tangudu 0 Reputation points
2025-06-27T21:35:14.9666667+00:00

I'm using Azure SignalR with a JavaScript/TypeScript client and an Azure Function App that sends messages via SignalR output bindings.

I'm experiencing unreliable message delivery — in most cases, the connected client does not receive notifications, and when it does, it's very rare and inconsistent.

Here's what I’ve verified so far:

The Function App logs show that the message is sent successfully (HTTP 202 Accepted received from SignalR).

The client is confirmed to be connected — I consistently see "connected" logs and no reconnecting or onclose events.

I am targeting messages by userId. While this worked occasionally in the past, the same connection (same userId) now rarely receives the messages, even though the connection is active.

I correctly register connection.on(...) before calling connection.start(), following SignalR best practices.

This is not caused by browser tab sleeping — the tab is active and in focus the entire time.

Additional observations:

I used the Azure SignalR Live Trace Tool and consistently see the following logs when I trigger a notification:

     Received message

     Processed message

     Sent message

     Processed request

This flow is triggered when I create a notification that:

     Writes data to Cosmos DB,

     Triggers a Change Feed,

     Invokes an Azure Function App,

     Which sends the message to Azure SignalR (via output binding),

     Which is supposed to deliver the message to all connected clients (targeted by userId).

Despite these successful logs in SignalR, the client does not receive anything most of the time.

Questions:

  • Based on this behavior, is there anything I might be missing in my code or configuration? I can confirm the SignalR connection is established successfully, and I see Live Trace logs and the expected connectionId from the negotiation response.

Tech Stack:

      Azure SignalR Service (Serverless mode)

      Azure Function App with SignalR output binding

      JavaScript/TypeScript client using @microsoft/signalr
Azure SignalR Service
Azure SignalR Service
An Azure service that is used for adding real-time communications to web applications.
161 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Shree Hima Bindu Maganti 4,925 Reputation points Microsoft External Staff Moderator
    2025-07-03T05:00:49.8733333+00:00

    Hi @Manimala Tangudu
    It seems you're having trouble with message delivery in Azure SignalR, even though the connection is successful and the targeting appears correct. Here are some things to check:

    Make sure your event handlers (like connection.on(...)) are properly set up and not unintentionally removed. Confirm they remain active when messages are sent.

    Double-check that the userId used in your Azure Function App matches the userId of the connected client, as mismatches can prevent delivery.

    Verify your SignalR output binding in the Azure Function App is correctly configured to send messages to the right userId.

    Even if the tab is active, network issues could affect connectivity. Tools like the Azure SignalR Live Trace Tool can help you monitor traffic and identify errors.

    Use the live trace tool for Azure SignalR Service

    If your app has high traffic, make sure you aren't hitting Azure SignalR Service limits, as this can impact message delivery.

    Since logs show messages are sent, consider adding more detailed logging in your Azure Function App to catch any exceptions or issues before sending.

    Troubleshooting guide for Azure SignalR Service common issues

    Real-time apps with Azure SignalR Service and Azure Functions
    Let me know if you have any further assistances needed.


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.