Server keeps going down and restarts after about 15 minutes
I'm using a server to facilitate online multiplayer in my PC game. The server is a small application written in Java. The problem is that the server keeps going down occasionally and restarts itself automatically after about 15 minutes. I have upgraded the server a couple of times but it didn't seem to make any difference, first I used an 1 GB 1 vCPU 20 GB standard droplet, after that an 8 GB 4 vCPUs 160 GB standard droplet and finally I tried a CPU Optimized Droplet with 4 GB 2 vCPUs 20 GB. I'm not completely sure but it seemed that the server went down when there were about 15 people online, but at times there are the same amount of people online (or more) and no crash occurs. It crashes about 1-2 times a day when most people are online (but I'm not 100% sure).
-1 minute after server crashed (7:29 pm) : https://imgur.com/a/Asit3O6
-Server down for 12 minutes (7:41 pm): https://imgur.com/a/ulIgTau
-Server back online (7:50 pm): https://imgur.com/a/gMOn4Jf
-Server back online for 28 minutes (8:18 pm): https://imgur.com/a/lA8dufN
-After server crashed (7:39 Pm): https://imgur.com/a/h7r701H
it shows: java.net.SocketException: Connection reset
-After the server is back online (7:50 pm): https://imgur.com/a/l85FYFw
The only thing I recognize is the ClientThread.java file which is one of the 3 java files that comprises the server.
I must also say that my experience with Java is very basic and that someone else made the java server files (who is not available), but I understand most part of it and made some small adjustments myself.
Any reason why this server keeps crashing occasionally?