Skip to content

ASP.NET Core SignalR messages are stalled for hours and lost #36020

@keremkambur

Description

@keremkambur

Bug Description

We are using SignalR to communicate between servers. We have an individual API that sends messages using group connection and if the destination API couldn't update a reference table that it received the message based on an identifier we pass, we establish a direct connection to that specific destination.

However, in some instances API that sends the messages doesn't respond for hours. Here below you may see an example request and its ultimate end.

2021-08-24 17:00:07.877 +00:00 [Information] Request starting HTTP/1.1 GET http://{serverBaseUri}/cacheUpdateHub?GroupName=Publisher&InstanceId={azureResourceName}-82cecef0&ApplicationName={azureResourceName}&MachineName=SandboxHost-637648365386280212&id=K34JTC9kfCLWJP_Gu-8gyQ

2021-08-24 18:50:44.065 +00:00 [Information] Request finished in 6636188.3742ms 101

We simply followed https://docs.microsoft.com/en-us/aspnet/signalr/overview/guide-to-the-api/working-with-groups and https://docs.microsoft.com/en-us/aspnet/signalr/overview/guide-to-the-api/mapping-users-to-connections#groups guides during the implementation. We are using our Azure resource names/instance IDs/machine names as the group and direct connection identifiers. Those messages are actually lost and the connection id K34JTC9kfCLWJP_Gu-8gyQ doesn't exist anywhere else except above in the logs.

To have more logs, we have added the below providers but they added nothing to the logs.

"Microsoft.AspNetCore.SignalR": "Debug",
"Microsoft.AspNetCore.Http.Connections": "Debug"

Further technical details

"Microsoft.AspNetCore.SignalR.Client" Version="3.1.7" "Microsoft.AspNetCore.SignalR" Version="1.1.0"`

Sender API: netcoreapp3.1
All listener APIs: netcoreapp3.1

Logs

If it's needed, some successful messages can also be shared as well as some end-to-end transaction logs from Application Insights. However, I didn't find them informing so didn't want to put them before it's asked.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Needs: Author FeedbackThe author of this issue needs to respond in order for us to continue investigating this issue.Status: No Recent Activityarea-signalrIncludes: SignalR clients and servers

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions