Ping issues since 1.12.2

Discussion in 'Performance Tweaking' started by zazaeaz, Oct 1, 2017.

  1. Hello,
    I updated my server to 1.12.2 sometime ago and i noticed something weird, my ping and all of the players is way too high, so i decided to take down the server and test 10 min on version from 1.12, 1.12.1 and 1.12.2.
    The result are constant ping of 30-35ms to a ping of over 100 ms (so i though it was plugin malfunction so i run command side/change plugin but same results).
    All tests were done in the same lenght of time and i got a fiber connection so no ping throttling whatsoever, pic here:
    My question is: Did 1.12.2 introduced a new mechanic server side that slow down the entire connection?
    • Like Like x 1
  2. Mojang changed the way keepalive packets work in the latest version of minecraft and it appears as if they broke it in the process. a lot of spigot servers are having this issue as well.
    • Agree Agree x 2
  3. Hi,
    Thx for the quick reply, is a fix already exist or a way to desactivate the keepalive?
  4. I've been having lots of issues on my server with ping as well, it seems to affect some players more than others? I'm one of the ones that is seeing a lot of issues, and it's rather annoying...

    I thought it was an issue with my domain name, as the domain registrar was recently ddosed (hover), but seeing this thread now, this makes sense. It's only been happening since updating to 1.12 .

    You can't "disable" keepalive packets, it's how the server keeps the connection to clients alive. hence the name. If it were "disabled" then nobody could connect to the server. As for what changes mojang did to this with 1.12, i'm curious as I haven't heard of it before?
    #4 ceruleanReverie, Oct 2, 2017
    Last edited: Oct 2, 2017
  5. they changed the keep alive id from VarInt to Long

    • Informative Informative x 4
  6. Hi,
    I dont see how a simple change of variable type could affect ping that much, even if long are 32bit (4bytes) stored and int only 16bit (2bytes), it wouldnt increase ping as keepalive is suppose to " reduces latency associated with HTTP transfers and delivers a better user experience."
  7. So... I thought that this would just end up being something annoying I would have to just deal with, but this is now actively keeping me (and some of my staff members) from even joining the server at all. Is there anything that can be done to fix this???
  8. Sorry for double-posting, but I found this issue in mojang's bug tracker. Looks like some others discovered it already, but it doesn't seem to be getting much attention from the mods there at the moment.

    This is making 1.12.2 almost unplayable on servers... and it seems like something not even spigot can fix due to the fact that it's implemented on the protocol level (although I could be wrong here).
  9. the packet change with 1.12.2 has nothing todo with the bug you mentioned. It just seems like your connection is too bad for minecraft (or the server kicked you) when you get a timeout on join.
  10. I have 100 mbps download speeds. I don't think it's my connection.
  11. it is a really weird issue. I have pure 1.12.2 spigot + latest bungecoord as a proxy and by playing from two PC in my home - one works fine, second got "Timed out" constantly when I'm changing sub-servers (or vice versa). Or both work fine)
    I have lic clients, no mods and min set of plugins (multiverse and essentialsX + authme on lobby only). My server is in USA (us-west), I'm from CIS, average ping is ~170-200 but everything worked fine before. The server is not overloaded.
    WTF with this keepalive tuning? where and how can I increase this timeout up to 30-60 secs?
  12. Paper has released patches to try and fix this issue.
  13. Thank you @ceruleanReverie
    I'd like to be on spigot engine) hope this issue will be resolved soon on any side - spigot, netty or vanilla server.
  14. electronicboy

    IRC Staff

    This is a spigot issue, not a netty/vanilla issue. Vanilla changed how keepalives work, and spigot ended up botching a resolution which they've been told the flaw with multiple times, hence leading me to make those patches for Paper. I've also modified how keepalives work to be more like they where in 1.12.1 and below, not really ideal, but should help with issues around lag spikes on servers causing people to disconnect, especially combined with my patch to fix spigots resolution to the changes.
    • Like Like x 1
    • Informative Informative x 1
  15. Welp, this does not appear to be the case. Ping issues are still just as bad with Paper 1.12.2 as Spigot 1.12.2. Moving back to Spigot 1.12.1 and everyone's ping literally halves.

    EDIT: Okay, that's not entirely true. Pings are similar for *most* people, but for some people they get random, really awful ping spikes that typically disconnect them after a few seconds. Also, someone playing 2 characters from the same machine will have wildly different pings for the two instances, whereas on 1.12.1 they were identical. One of those players used to have pings of 30 and 30, now 177 and 52... seemingly no other differences.
    #15 mraureliusr, Oct 24, 2017
    Last edited: Oct 24, 2017
  16. electronicboy

    IRC Staff

    I cannot see any way in which the latency could double vs 1.12.1 paper/spigot and 1.12.2 paper, how are you measuring ping? Beyond the change to a variable type, I have one theory and it's based upon the fact that they're using nanotime, instead of currentMillis, which can be much more expensive on some platforms, what OS are you running your server on?
  17. Fedora 26. Some players are seeing way more than double. One of my regular players lives about 30 minutes away from me and his ping typically fluctuates between 30-60ms, at most. He was peaking at over 700ms yesterday with 1.12.2, averaging well over 100, typically around 120ms. Even my own ping was higher! I usually have 1 or 2ms ping, as the server is on my LAN, but I was seeing my ping up in the 10-15ms range. I am measuring ping using the TAB plugin

    The other big issue with 1.12.2 is instability, but I have a feeling that's upstream and not Paper either... Really annoying as I like to keep the server bleeding edge, but we've had to stay on 1.12.1. I am praying that 1.12.3/1.13 fixes these issues, because I refuse to be one of those people who are still playing 1.7 today.
    • Like Like x 1
  18. I have the same bug with 1.12.2..?

  19. out of 10/7 of my players cant connect
  20. i have the same issue just today with latest paperspigot and bungeecord version