Client permanently reconnecting

We have had some problems with our Azure site hanging. It seems like it runs out of connections, and we need to restart it to get it online again. At the same time, we see lots and lots of “onLeave” and “onJoin” events for the same user.

I know this is a bit vague, but just to check if we’re barking up the wrong tree or not: Could it be that that a user behind a proxy has problems keeping the connections up, and swamps the server with connection attempts?

Ideally you shouldn’t be trying to access Server Events through a proxy as they could impact the long-running /event-stream, but it should work if buffering and chunked-encoding is turned off.

The problem is that whether our customers’ users are sitting behind a proxy server or not is beyond our control. I have been thinking of counting the reconnects, and stop trying if they reach some level inside a certain period of time.

From the timestamps, it seems like it is the heartbeat request failing, thus resulting in a reconnect. (These are all the same user, sitting inside a company network, connecting to an Azure site.)

They’re not failed heartbeat messages, what does WebInspector say why the heartbeat requests are failing?

They don’t fail on my computer. These messages are notifications that another user is constantly leaving and reconnecting. I have added some more logging, and will contact the users experiencing this over the weekend.

But a failed hearbeat results in a reconnect, and that will fire onLeave and onJoin, won’t it?

A failed event-stream, a non-existent or failed heartbeat all results in a reconnect.

It’s important to find out what’s causing the reconnects and why.

1 Like