How to find the cause of bad TCP connections

We are developing an online game in which players communicate with the server using a permanent TCP connection. Permanent, as in, his lifetime is the playerโ€™s session, and if the connection is closed, the player is thrown out of the game (although the client will try to automatically connect).

Problem

Now, of course, everything works well in our office (connecting to both test and live servers), but our client reports that some players disconnect many times (every few seconds), and that they themselves experience it (although their offices are in the same building).

Question

How to find out the reason for these outages? It's because:

  • Players have poor internet connections and this cannot help.
  • The distance between the players and the server (Turkey โ†” Netherlands) is too great.
  • Something is wrong with the server (CentOS machine) or data center.
  • The server is overloaded (although this also occurs at low loads).
  • There is a bug in our software.
  • Or for some other reason?

The software is written in Java. It logs in when players are disconnected, and if it actively kicks them (for example, in order not to send keep-alive messages), it also logs this.

Known data

  • Whenever a false disconnect is reported, and I check the logs, most of the time I do not see this player actively kicking the server software, only to see that the connection was closed.
  • There is an internal monitoring service that has a bunch of local connections to the game server, just like the players, and it doesnโ€™t disconnect.

-, . ? ( / , )

  • UDP? , , , , TCP , . - ? ( , , Flash, UDP).
  • - TCP, , ?
  • , ?
  • ?
+5
1

" ", , . .

, , , - . , ( .getCause() - .getCause() , ), , , , , , , , , .. : " , -, , , , ?" , , .

, , , , /, . , , (, , , , ), .

, , , , , , " " , .

+1

All Articles