question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Azure SignalR Service randomly drops connections immediately after successful connect

See original GitHub issue

Describe the bug

We have 4 virtually identical Azure SignalR services and two of them are behaving badly. Using the same client and hub, I can connect to two of them without issues. The other two have been exhibiting a strange bug since about Thursday/Friday last week where the client will often connect (via the Hub) and then instantly disconnect with the error:

Microsoft.AspNetCore.SignalR.HubException: The server closed the connection with the following error: Connection closed with an error.

If the client retries, sometimes up to 10 or more times it will eventually reconnect successfully and then work as expected.

We are not hitting any service limits, we are currently using the “Standard” size although they are not used in production (yet), but we need to get to the bottom of the issue to know that this won’t happen again.

To Reproduce

I can email details on how to connect to our API with a reproducible code sample on request.

Exceptions (if any)

Microsoft.AspNetCore.SignalR.HubException: The server closed the connection with the following error: Connection closed with an error.

Further technical details

  • Microsoft.AspNetCore.SignalR.Client v5.0.11
  • Microsoft.AspNetCore.SignalR.Core v1.1.0

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:10 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
schotimecommented, May 9, 2022

Ok, turns out mine was that the message exceeded 32KB, and I had to turn EnableDetailedErrors on to find the actual error.

0reactions
schotimecommented, May 9, 2022

I’ve just been getting this today, and I think i’ve had it other times too. Did anything come of this? This is also Australia East

Read more comments on GitHub >

github_iconTop Results From Across the Web

Troubleshooting guide for Azure SignalR Service
For ASP.NET SignalR, when the client connection drops, it reconnects using the same connectionId for three times before stopping the connection.
Read more >
Signal R randomly loses connection to the server side
After 20 seconds without a successful reconnect, the disconnected event is raised on JavaScript clients.
Read more >
Chrome disconnects signalR hub : r/dotnet
In my experience with SignalR it'll drop the connection but once you bring the tab back up it should open up a new...
Read more >
How to use the Azure SignalR Service - YouTube
After that he will show you what it takes to start leveraging the ... of the Azure SignalR service 00:04:02 - Demo of...
Read more >
Scaling Out Your Own SignalR Chat Application
The Azure SignalR service is simple to configure and does most of the job of scaling and configuration for you.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found