Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OnReconnect gets called hundreds of times #87

Open
fwhenin opened this issue Jun 6, 2017 · 3 comments
Open

OnReconnect gets called hundreds of times #87

fwhenin opened this issue Jun 6, 2017 · 3 comments

Comments

@fwhenin
Copy link

fwhenin commented Jun 6, 2017

So we've been having an issue in our production servers, all of a sudden the number of web requests gets really high, enough that our prod servers crash and restarts. I haven't been able to find exactly why it's happening (cause I can't replicate it) but I have noticed locally a couple times that "OnReconnect" method gets called hundreds of time in a row...BY ONE USER. I haven't been able to find why it's happening or how to consistently replicate it. any ideas?

@JustMaier
Copy link
Owner

@fwhenin I realize this is really old now, but did you ever find a solution here?

@hackntest
Copy link

Same issue here, any idea about how to fix it?

@jo-me
Copy link

jo-me commented Mar 16, 2018

After implementing a simple reconnect "strategy" that creates a new hub after a disconnect, I saw that this component produces 100s of error messages in chrome console if the signalR endpoint is not available (e.g. when the UI is started in dev mode without a backend).
I'm assuming this is the same problem as this one here. It lead primarily to client-side issues for me because the chrome tab freezes after 2 minutes.

Based on this approach here (https://stackoverflow.com/a/23407156) I'm now not creating a new hub every 5 seconds but instead trigger a HTTP request to the signalR endpoint. Only if that one is successful (status 200 on GET/HEAD request to /signalr/negotiate) I will create a new hub.

I have not tested it extensively but on the first tries it feels like a big improvement to not have to kill the chrome tab after a signalr connection loss.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants