MCHPR / MCHPRS

A multithreaded Minecraft server built for redstone.
MIT License
1.59k stars 69 forks source link

Players cannot join when RTPS really high #13

Closed ghost closed 2 years ago

ghost commented 4 years ago

Didn't do much testing on this issue but i found I couldn't login when someone set the RTPS to 35000. Got 'Connection timed out'

AggYz commented 4 years ago

Ye, that was my server I repeated it 3 times and whenever the tps is really, really high, Other players weren't able to join it. However I could connect to it using localhost and I then lowered the rtps and you were able to join.

AL1L commented 3 years ago

Maybe the player should have some flag to not send update packets until they properly join the world. Not sure if that'd cause desync issues though.

Another idea would be to change the RTPS back to 10 when a player is joining for a second?

Ocawesome101 commented 3 years ago

Another solution could just be to limit the number of packets sent. Currently, even at just 8000RTPS the server sends nearly 20KB/s (from memory, could be much higher in reality) to the client with just a basic repeater clock. Only sending the server state every game tick, rather than every time it updates, could greatly help this issue, particularly for those of us with slower internet connections.

Basically just rate-limit the server.

StackDoubleFlow commented 2 years ago

Rate limiting was implemented, and this issue should be fixed now. Feel free to reopen if you are still experiencing this issue.