Troubleshooting a recurring client disconnect

For discussion of the Poker Mavens server module and other administration topics
shuffleup
Posts: 18
Joined: Wed May 06, 2020 1:41 pm

Troubleshooting a recurring client disconnect

Post by shuffleup »

I run a bi-weekly game with the same set of 10 players. There is one player who experiences several connection hangs over the course of a 4 hour session. To recover I'm having to pause the table and wait for him to manually drop from the site then re-enter. He's running on the same local ISP as some of the other players. He's tried it on both an iPad and Mac, with both Safari and Chrome, yet still sees the problem. I guess that implies a network problem, perhaps a dropped packet somewhere, although he doesn't experience problems with any other online app.

What debugging/logging mechanisms are available on the client and/or server side to help troubleshoot the issue?
Kent Briggs
Site Admin
Posts: 5878
Joined: Wed Mar 19, 2008 8:47 pm

Re: Troubleshooting a recurring client disconnect

Post by Kent Briggs »

When he's on the Mac, is that hardwired to the router or connected via wifi? If it's wifi, see if he has the ability to do a CAT5/6 wired connection. At least once just to see if the wifi signal was the issue.
shuffleup
Posts: 18
Joined: Wed May 06, 2020 1:41 pm

Re: Troubleshooting a recurring client disconnect

Post by shuffleup »

Kent Briggs wrote:When he's on the Mac, is that hardwired to the router or connected via wifi? If it's wifi, see if he has the ability to do a CAT5/6 wired connection. At least once just to see if the wifi signal was the issue.
He's wireless. His router is too far away for a wired connection.
Kent Briggs
Site Admin
Posts: 5878
Joined: Wed Mar 19, 2008 8:47 pm

Re: Troubleshooting a recurring client disconnect

Post by Kent Briggs »

shuffleup wrote:He's wireless. His router is too far away for a wired connection.
Could he be too far away for a reliable wireless connection?
shuffleup
Posts: 18
Joined: Wed May 06, 2020 1:41 pm

Re: Troubleshooting a recurring client disconnect

Post by shuffleup »

Kent Briggs wrote:
shuffleup wrote:He's wireless. His router is too far away for a wired connection.
Could he be too far away for a reliable wireless connection?
His connection is otherwise fine for all other sites. We're working on getting his setup local to the router so we can try an ethernet connection.

Is there any logging available on the client/server side to trace where a packet might be dropped?
Kent Briggs
Site Admin
Posts: 5878
Joined: Wed Mar 19, 2008 8:47 pm

Re: Troubleshooting a recurring client disconnect

Post by Kent Briggs »

shuffleup wrote:His connection is otherwise fine for all other sites.
Regular web sites don't require full duplex websocket connections. Brief disconnects won't even be noticed there.
Is there any logging available on the client/server side to trace where a packet might be dropped?
You're either connected or disconnected. Does the Event Log on the server show him disconnecting?
shuffleup
Posts: 18
Joined: Wed May 06, 2020 1:41 pm

Re: Troubleshooting a recurring client disconnect

Post by shuffleup »

Kent Briggs wrote:Regular web sites don't require full duplex websocket connections. Brief disconnects won't even be noticed there.
Most web servers are running http/2 which maintain persistent full-duplex socket connections for all traffic, both of the initial page load and for any refhresable content as well.
Kent Briggs wrote:You're either connected or disconnected. Does the Event Log on the server show him disconnecting?
The log only shows a disconnect after the player manually intervenes to reload the site and log back in to get back to his hand, so his TCP socket connection is probably still live.

How robust is your client/server socket protocol for both dropped packets and dropped connections? As it stands it doesn't look like it recovers from either - when his client stops refreshing he still has full connectivity to the internet, which implies a recovery would be possible if the missed packet is retried (dropped packet case) or the connection re-esbtalished (dropped connection case). I know the issue isn't on the server side because the other players are on the same local ISP and have the same route to my server, which is running on a high-availability AWS instance.
Kent Briggs
Site Admin
Posts: 5878
Joined: Wed Mar 19, 2008 8:47 pm

Re: Troubleshooting a recurring client disconnect

Post by Kent Briggs »

shuffleup wrote:Most web servers are running http/2 which maintain persistent full-duplex socket connections for all traffic, both of the initial page load and for any refhresable content as well.
They also make a half dozen connections with simple file requests that aren't time sensitive.
How robust is your client/server socket protocol for both dropped packets and dropped connections?
It relies on the Javascript Websocket component to make the connection and detect drops. If it a drop is detected it triggers an onclose() event and my code throws up a message and attempts a new connection in a loop.
shuffleup
Posts: 18
Joined: Wed May 06, 2020 1:41 pm

Re: Troubleshooting a recurring client disconnect

Post by shuffleup »

Kent Briggs wrote:It relies on the Javascript Websocket component to make the connection and detect drops. If it a drop is detected it triggers an onclose() event and my code throws up a message and attempts a new connection in a loop.
The player doesn't see any message on his client. All he sees is a stale view of the action, ie it shows the action on the player before him even though the action has advanced to him. All the other players see the action has advanced.

So if there's no client message of the disconnect and no server log message of the disconnect does that not imply a dropped packet? Likely caused by intermittent home wireless issues at this player's house. Does the client/server ever attempt to resync up on the existing socket connection after some idle period to handle this case? If not automatically can such logic at least be attached to something the player can do short of manually disconnecting/reconnecting (which is very time consuming)? For example, perhaps tie it to the existing 'Refresh table' menu option.
Kent Briggs
Site Admin
Posts: 5878
Joined: Wed Mar 19, 2008 8:47 pm

Re: Troubleshooting a recurring client disconnect

Post by Kent Briggs »

shuffleup wrote:The player doesn't see any message on his client.
Then the browser hadn't detected one yet and thus the Websocket object didn't either and of course neither did my code.
does that not imply a dropped packet? Likely caused by intermittent home wireless issues at this player's house.
That would be my guess.
Does the client/server ever attempt to resync up on the existing socket connection after some idle period to handle this case?
No, Javascript on the client runs in a single thread and relies on the Websocket object events to notify it of any problems.
short of manually disconnecting/reconnecting (which is very time consuming)? For example, perhaps tie it to the existing 'Refresh table' menu option.
Just clicking the browser's refresh button will cause the client to reload and reconnect so that shouldn't be very time consuming. Unless of course there's a web site login involved with a session key generated, etc.
Post Reply