ServerSync

ServerSync

48.5k Downloads

Client Timeout Downloading Larger Mod

TylzSomeone opened this issue · 6 comments

commented

Serversync Version: 4.0.0

Minecraft Version: 1.16.5

Issue: Client timeout for 35MB file and 15MB file

In the FAQ on curseforge there is mention of a max file size but I am not sure what that max size is or if it is adjustable. Had no issues syncing the rest of the mods folder when the 2 larger files were removed from the mix.

I noticed another issue (#241) mentioning this but the result was not clear on whether it is a max file size issue or something else. The files are successfully transferred over LAN, as well.

commented

Do you have the logs? logs/serversync

#241 increased the timeout for transferring files to 20 minutes, it should really get refreshed though when bytes are transferred, it is only meant to disconnect inactive connections.

commented
Log serverysync
[Mar 08, 2021 2:03:56][ServerSync] INFO: Connection established with Socket[addr=/184.XX.XXX.XXX,port=57118,localport=38067]Mar 8, 2021 2:03:56 PM
[Mar 08, 2021 2:03:56][ServerSync] FINE: Reset timeout for client: /184.XX.XXX.XXX, with a timeout of: 120000
[Mar 08, 2021 2:03:56][ServerSync] INFO: Received message: SERVER_INFO, from client: /184.XX.XXX.XXX
[Mar 08, 2021 2:03:56][ServerSync] INFO: Sending server information
[Mar 08, 2021 2:03:56][ServerSync] FINE: Reset timeout for client: /184.XX.XXX.XXX, with a timeout of: 120000
[Mar 08, 2021 2:03:56][ServerSync] INFO: Received message: 4.EServerMessage.GET_MANIFEST, from client: /184.XX.XXX.XXX
[Mar 08, 2021 2:03:57][ServerSync] FINE: Reset timeout for client: /184.XX.XXX.XXX, with a timeout of: 120000
[Mar 08, 2021 2:03:58][ServerSync] INFO: Received message: 5.EServerMessage.UPDATE_FILE, from client: /184.XX.XXX.XXX
[Mar 08, 2021 2:03:58][ServerSync] INFO: Writing C:\Users\Tylz\Desktop\Direwolf Server\mods\minecolonies-0.13.670-ALPHA-universal.jar.DISABLED to client /184.XX.XXX.XXX...
[Mar 08, 2021 2:03:58][ServerSync] FINE: File size is: 37800553
[Mar 08, 2021 2:05:57][ServerSync] INFO: Client connection timed out, closing Socket[addr=/184.XX.XXX.XXX,port=57118,localport=38067]
[Mar 08, 2021 2:05:57][ServerSync] FINE: Failed to write file: C:\Users\Tylz\Desktop\Direwolf Server\mods\minecolonies-0.13.670-ALPHA-universal.jar.DISABLED
[Mar 08, 2021 2:05:57][ServerSync] FINE: [java.net.SocketOutputStream.socketWrite(Unknown Source), java.net.SocketOutputStream.write(Unknown Source), java.io.ObjectOutputStream$BlockDataOutputStream.writeBlockHeader(Unknown Source), java.io.ObjectOutputStream$BlockDataOutputStream.write(Unknown Source), java.io.ObjectOutputStream.write(Unknown Source), com.superzanti.serversync.server.ServerWorker.transferFile(ServerWorker.java:298), com.superzanti.serversync.server.ServerWorker.run(ServerWorker.java:155), java.lang.Thread.run(Unknown Source)]
[Mar 08, 2021 2:05:57][ServerSync] INFO: Finished writing: C:\Users\Tylz\Desktop\Direwolf Server\mods\minecolonies-0.13.670-ALPHA-universal.jar.DISABLED, to client: /184.XX.XXX.XXX
[Mar 08, 2021 2:05:57][ServerSync] INFO: Closing connection with: Socket[addr=/184.XX.XXX.XXX,port=57118,localport=38067]
commented

Added a timeout refresh whenever data is transferred across the socket to the client, this should avoid timeout issues with larger files.
https://github.com/superzanti/ServerSync/releases/tag/v4.2.0

commented

Possibly related to #257

commented

Bumpped to 4.2.0, the performance fix in 4.1.0 should help with this problem but a real fix would be to reset the timeout while the socket is active.

commented

4.1.0 Did fix my particular issue, thank you.