Blazor Server App Websocket Disconnects Every 50 Seconds For Some Clients - Stack Overflow

admin2025-04-25  2

A Blazorserver app that has been working for 4 years is currently used by about 100 people a day.

[Update: The issue could be recreated just by creating a new Blazor server app and publishing it to the server.]

Last Friday (10-Jan-2025), 6 people started having issues that make it unusable. The websocket disconnects approximately every 50 seconds with this message output by the client:

Error: Connection disconnected with error 'Error: WebSocket closed with status code: 1006 (no reason given).'.

On the server, the disconnection looks like this:

Connection Down: - Circuit ID: xyz - Disconnection Type: Graceful (user action)

This relates to either their ISP or their router or Cloudflare. If they connect to the internet using their phone as a hotspot the application works fine.

When they are connected to the internet with the connection that causes problems they can still access another Blazorserver app without issue.

The app was designed in NET6.0 and updated to NET9.0 but only updated after the issue appeared.

The users with the problem all use either EE (Everything Everywhere) or BT (British Telecom) as their ISP, here is the UK. However, I use BT myself without having the problem, although I use a TP-Link router. I tried using my old BT router and everything was fine.

I wondered if anyone had encountered something similar or knew of an update that went out by BT / EE last Thursday/Friday.

A Blazorserver app that has been working for 4 years is currently used by about 100 people a day.

[Update: The issue could be recreated just by creating a new Blazor server app and publishing it to the server.]

Last Friday (10-Jan-2025), 6 people started having issues that make it unusable. The websocket disconnects approximately every 50 seconds with this message output by the client:

Error: Connection disconnected with error 'Error: WebSocket closed with status code: 1006 (no reason given).'.

On the server, the disconnection looks like this:

Connection Down: - Circuit ID: xyz - Disconnection Type: Graceful (user action)

This relates to either their ISP or their router or Cloudflare. If they connect to the internet using their phone as a hotspot the application works fine.

When they are connected to the internet with the connection that causes problems they can still access another Blazorserver app without issue.

The app was designed in NET6.0 and updated to NET9.0 but only updated after the issue appeared.

The users with the problem all use either EE (Everything Everywhere) or BT (British Telecom) as their ISP, here is the UK. However, I use BT myself without having the problem, although I use a TP-Link router. I tried using my old BT router and everything was fine.

I wondered if anyone had encountered something similar or knew of an update that went out by BT / EE last Thursday/Friday.

Share Improve this question edited Jan 24 at 11:37 Sparked asked Jan 16 at 11:28 SparkedSparked 87410 silver badges26 bronze badges 7
  • You may want to add in which country/region this plays. BT is British Telecom? – Henk Holterman Commented Jan 16 at 12:11
  • @HenkHolterman Thank you. Just updated the question. Yes, British Telecom. – Sparked Commented Jan 16 at 12:15
  • Please try this Blazor Server Side - Error: WebSocket closed with status code: 1006 () after 15 seconds. – Jason Commented Jan 17 at 6:12
  • Thanks for the suggestion @JasonPan but this made no difference to the issue, I'm afraid. – Sparked Commented Jan 17 at 10:34
  • Hi @Sparked, could you share your .csproj file, I need to check the packages version. Please make sure all the packages are up-to-date. – Jason Commented Jan 22 at 6:59
 |  Show 2 more comments

1 Answer 1

Reset to default 1

The workaround for now is to turn off Cloudflare.

转载请注明原文地址:http://anycun.com/QandA/1745534844a90887.html