'Blazor Attempting to reconnect - use web assembly, or...?
I am being plagued with the dreaded "Attempting to reconnect" message. The problem only occurs when the application is published on Azure, never when run locally. The problem is reproduced by showing a dialogue (Syncfusion) and waiting. The dialogue has a number of standard edit controls. You see the reconnect message after around 3-8 mins and then a 403 error, with the browser console msg "WebSocket closed with status code: 1006". This is a server-side application .Net 5.0, x86, VS 2019.
I have my suspicions about some third-party components but fear that this problem will always be round the corner. It is most frequently seen when displaying a Syncfusion dialog. I am trying, by elimination, to expose the root cause of the problem, without repeatable success so far.
At the moment, this highly frustrating and time-consuming problem is blocking all progress and deployment, with the spectre of having to completely replace all components or do some major re-write. Syncfusion, so far, can not reproduce the issue, but with a zillion variables in the mix, this is not surprising.
What are the likely causes of error 1006 in this context and how might I debug anything to find the real culprit?
How can I prevent this entire issue e.g. with some keep-alive type message?
How can I completely control the timeout period e.g. extend the timeout to 15+ mins? Seemingly users need time on this complex dialogue/form - which might be a justification for not using a dialogue at all...
Would switching from server-side to web assembly eliminate/avoid the problem?
In some desperation, thanks in advance.
Solution 1:[1]
@HenkHolterman Web Sockets are "On" in the Azure config.
Apologies to all - I have now found the root cause. It was all due to the "shared CPU" Azure plan (D1) which caused a CPU restart/reset of some sort, which had the effect described. I was able to correlate the view change with the quota view in Azure. Obvious when you think about it, but I was not that aware of the plan used and might have imagined that some magic would have prevented this ugly effect. Seems there is no realistic alternative but to move to at least B1 or above. @JesseGood - thanks for the logging leads - that led me towards this result.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | jas |