Frequent Timeouts On Velocity

So I have a private fabric server network behind a velocity proxy hosted on OCI. The backend(s) uses fabric 1.21 and fabricproxylite for velocity support It works, but my players keep getting timeouts randomly while playing.
136 Replies
Admincraft Meta
Admincraft Metaβ€’3w ago
Thanks for asking your question!
Make sure to provide as much helpful information as possible such as logs/what you tried and what your exact issue is
Make sure to mark solved when issue is solved!!!
/close !close !solved !answered
Requested by _.dominic#0
π’Ÿπ‘œπ“‚π’Ύπ“ƒπ’Ύπ’Έ
I guess i can run a spark report, gimme 5 mins
Rhythmatic
Rhythmaticβ€’3w ago
1. Is it while playing or on connection? 2. Is it specific players or all of them? 3. Do you have anecdotal experience from a time that you did not use Velocity and did not have this issue? 4. What are you hosting your server and proxy on? 5. How long as this issue been happening? 6. Has there ever been a time when it was not happening? and yes, please do
π’Ÿπ‘œπ“‚π’Ύπ“ƒπ’Ύπ’Έ
1. Is it while playing or on connection? While playing, connection is fine 2. Is it specific players or all of them? All players (myself included) 3. Do you have anecdotal experience from a time that you did not use Velocity and did not have this issue? It happens, but the frequency of occurrences reduced dramatically compared to when Velocity is introduced 4. What are you hosting your server and proxy on? Backend(s): Home Proxy: OCI 5. How long as this issue been happening? Ever since I started using velocity 6. Has there ever been a time when it was not happening? Not really spark is running will provide link when its done
Rhythmatic
Rhythmaticβ€’3w ago
#3 and #5 directly contradict each other. Did you previously have your server open to players without using Velocity?
π’Ÿπ‘œπ“‚π’Ύπ“ƒπ’Ύπ’Έ
spark
spark is a performance profiler for Minecraft clients, servers, and proxies.
Admincraft Meta
Admincraft Metaβ€’3w ago
Spark Profile Analysis
❌ Processing Error
The bot cannot process this Spark profile. It appears that the platform is not supported for analysis. Platform: Fabric
Requested by _.dominic
Ashank
Ashankβ€’3w ago
My instincts are telling me there's probably something breaking between the OCI server and your backend
π’Ÿπ‘œπ“‚π’Ύπ“ƒπ’Ύπ’Έ
Ive been considering the possibility if OCI is the problem
Rhythmatic
Rhythmaticβ€’3w ago
Your server is poorly optimized. 1. Shenandoah GC is NOT recommended for Minecraft. There are some misinformed people who put a lot of effort into recommending it, but even so, they are wrong. G1GC with Aikar's flags as generated by https://flags.sh is still preferable. 2. Your memory flags are wrong. -Xms and -Xmx should never be different. Always set them equal. The JVM avoids expanding the heap as much as possible, so you are essentially forcing it to try to minmax the initial allocation space. Once it finally accepts that it needs to grow the heap, this wastes CPU time. Set them equal. Fix those issues first and then we can talk.
flags.sh
flags.sh
A simple script generator to start your Minecraft servers with optimal flags.
π’Ÿπ‘œπ“‚π’Ύπ“ƒπ’Ύπ’Έ
however I couldn't verify this possibility fair, will change that
Ashank
Ashankβ€’3w ago
Wait for #2. That still matters? Thought the jvm just took what it needed dynamically and just kept it
Rhythmatic
Rhythmaticβ€’3w ago
On G1GC, yes. Expanding the heap takes cycles. It's not free.
Ashank
Ashankβ€’3w ago
Makes sense ig
Rhythmatic
Rhythmaticβ€’3w ago
might be different on Z or Shen, but they're both shit for MC, so doesn't matter.
π’Ÿπ‘œπ“‚π’Ύπ“ƒπ’Ύπ’Έ
should I keep large pages
Rhythmatic
Rhythmaticβ€’3w ago
You should use the flags exactly as generated without changes
Ashank
Ashankβ€’3w ago
I pray one day mcjava server software becomes as optimized as bedrock alternatives (specifically dragonfly)
Rhythmatic
Rhythmaticβ€’3w ago
@π’Ÿπ‘œπ“‚π’Ύπ“ƒπ’Ύπ’Έ Oh and #4, your OS is swapping memory. You'll want to turn swappiness to 0 in your OS. https://help.ubuntu.com/community/SwapFaq#What_is_swappiness_and_how_do_I_change_it.3F
π’Ÿπ‘œπ“‚π’Ύπ“ƒπ’Ύπ’Έ
I see is it related to the disconnects by chance?
Rhythmatic
Rhythmaticβ€’3w ago
All of this can be related to disconnects, yes. We have to eliminate all of these normal performance issues to eliminate that possibility. If the disconnects persist, then we move on to other possibilities.
π’Ÿπ‘œπ“‚π’Ύπ“ƒπ’Ύπ’Έ
Will do, I'll patch the issues mentioned, then report back if it happens again Thanks for the heads up
Ashank
Ashankβ€’3w ago
Btw try to spam reconnect Might be some ratelimiting bs
Rhythmatic
Rhythmaticβ€’3w ago
Sounds good. Feel free to leave the thread open for a day or two if necessary. I'm also interested in this, so I'd love it if you pinged me if something new comes up. Yeah, for a network heavy node like a Velocity box, I'd sooner use a small AWS EC2 instance than Oracle.
Ashank
Ashankβ€’3w ago
Tbh I've had similar issues back when I was a free tier user
Rhythmatic
Rhythmaticβ€’3w ago
or Azure, or Digital Ocean, etc
π’Ÿπ‘œπ“‚π’Ύπ“ƒπ’Ύπ’Έ
I use one of their 1c1g instances in oracle free πŸ˜„
Ashank
Ashankβ€’3w ago
Oh. So that's why We've found the cause πŸ˜‚
Rhythmatic
Rhythmaticβ€’3w ago
That's definitely not helping.
π’Ÿπ‘œπ“‚π’Ύπ“ƒπ’Ύπ’Έ
Ive heard the routing is suboptimal, yes
Ashank
Ashankβ€’3w ago
Their networking on those is dogshit. "suboptimal" is an understatement Grab a 1c/4G arm server and throw velocity on thst
Rhythmatic
Rhythmaticβ€’3w ago
Seriously, get some free credits for a big enterprise host, and put your Velocity server on that. EC2 (and similar) instances are dogshit for MC servers, but great for Velocity and other networking heavy applications.
Ashank
Ashankβ€’3w ago
At least you get gigabit networking then This. 200x over
π’Ÿπ‘œπ“‚π’Ύπ“ƒπ’Ύπ’Έ
so I should consider AWS?
Ashank
Ashankβ€’3w ago
Aws, digital ocean, linode, azure Anything you want really
Rhythmatic
Rhythmaticβ€’3w ago
AWS, Azure, Digital Ocean, etc. Something big with really solid networking infrastructure. But only for the proxy. Never for a Minecraft server. Their performance profile is wrong for Minecraft servers.
π’Ÿπ‘œπ“‚π’Ύπ“ƒπ’Ύπ’Έ
I've heard DO is more budget compared to azure/aws
Ashank
Ashankβ€’3w ago
Btw how are you connecting it to ur backend Yes But iirc no free credits?
Rhythmatic
Rhythmaticβ€’3w ago
DO frequently hands out free credits. I've gotten DO credits before.
Ashank
Ashankβ€’3w ago
Oh nvm, guess I'm just unlucky Never gotten em
Rhythmatic
Rhythmaticβ€’3w ago
Skill issue tbh.
π’Ÿπ‘œπ“‚π’Ύπ“ƒπ’Ύπ’Έ
so you think my issue is mostly caused by OCI?
Rhythmatic
Rhythmaticβ€’3w ago
It's definitely a strong contributor lmfao but the other issues I highlighted absolutely did not help and likely contributed
π’Ÿπ‘œπ“‚π’Ύπ“ƒπ’Ύπ’Έ
shenGC without velocity is actually not that bad compared to G1GC ive tried both
Rhythmatic
Rhythmaticβ€’3w ago
Please don't make me search through a bunch of posts to find the performance comparison that absolutely eviscerates Shen as a viable contender for MC servers. I know I have the link somewhere, but I don't remember if it's in my bookmarks, reddit saved posts, screenshots, github stars, or whatever else. Please just take my word for it. It LOOKS viable at a glance if you don't know how to test it. It is NOT viable.
Ashank
Ashankβ€’3w ago
Can you πŸ₯Ί
Rhythmatic
Rhythmaticβ€’3w ago
Ugh.
Ashank
Ashankβ€’3w ago
I wanna read
Rhythmatic
Rhythmaticβ€’3w ago
I fucking hate you Ashank. πŸ˜‚ I'll eventually dredge it up for the AC wiki project.
Ashank
Ashankβ€’3w ago
❀️❀️❀️ ly2 πŸ‘ Why did discord move edit Nvm huh? Electron bugging
Rhythmatic
Rhythmaticβ€’3w ago
can you rewrite that so it makes sense to my brain? OH nevermind. got it.
Ashank
Ashankβ€’3w ago
Lol
Rhythmatic
Rhythmaticβ€’3w ago
@π’Ÿπ‘œπ“‚π’Ύπ“ƒπ’Ύπ’Έ ANYWAY, make those performance changes, move off of Oracle, and then tag me for followup. I'm hella curious.
π’Ÿπ‘œπ“‚π’Ύπ“ƒπ’Ύπ’Έ
guess ill use my aws free creds then
Rhythmatic
Rhythmaticβ€’3w ago
(and if you really don't wanna use Velocity, nginx isn't it. You wanna use Fast Reverse Proxy and Byerwall.)
GitHub
GitHub - fatedier/frp: A fast reverse proxy to help you expose a lo...
A fast reverse proxy to help you expose a local server behind a NAT or firewall to the internet. - fatedier/frp
π’Ÿπ‘œπ“‚π’Ύπ“ƒπ’Ύπ’Έ
dominic@thmc-prod:~/server$ java -Xms8192M -Xmx8192M --add-modules=jdk.incubator.vector -XX:+UseG1GC -XX:+ParallelRefProcEnabled -XX:MaxGCPauseMillis=200 -XX:+UnlockExperimentalVMOptions -XX:+DisableExplicitGC -XX:+AlwaysPreTouch -XX:G1HeapWastePercent=5 -XX:G1MixedGCCountTarget=4 -XX:InitiatingHeapOccupancyPercent=15 -XX:G1MixedGCLiveThresholdPercent=90 -XX:G1RSetUpdatingPauseTimePercent=5 -XX:SurvivorRatio=32 -XX:+PerfDisableSharedMem -XX:MaxTenuringThreshold=1 -Dusing.aikars.flags=https://mcflags.emc.gs -Daikars.new.flags=true -XX:G1NewSizePercent=30 -XX:G1MaxNewSizePercent=40 -XX:G1HeapRegionSize=8M -XX:G1ReservePercent=20 -jar fabricserver.jar --nogui
Killed
dominic@thmc-prod:~/server$ java -Xms8192M -Xmx8192M --add-modules=jdk.incubator.vector -XX:+UseG1GC -XX:+ParallelRefProcEnabled -XX:MaxGCPauseMillis=200 -XX:+UnlockExperimentalVMOptions -XX:+DisableExplicitGC -XX:+AlwaysPreTouch -XX:G1HeapWastePercent=5 -XX:G1MixedGCCountTarget=4 -XX:InitiatingHeapOccupancyPercent=15 -XX:G1MixedGCLiveThresholdPercent=90 -XX:G1RSetUpdatingPauseTimePercent=5 -XX:SurvivorRatio=32 -XX:+PerfDisableSharedMem -XX:MaxTenuringThreshold=1 -Dusing.aikars.flags=https://mcflags.emc.gs -Daikars.new.flags=true -XX:G1NewSizePercent=30 -XX:G1MaxNewSizePercent=40 -XX:G1HeapRegionSize=8M -XX:G1ReservePercent=20 -jar fabricserver.jar --nogui
Killed
uhm. how could it be OOM
dominic@thmc-prod:~/server$ sudo dmesg | grep java
[sudo] password for dominic:
[12382.617922] [ 2196] 1000 2196 2988774 376935 11530240 1029664 0 java
[12382.617931] oom-kill:constraint=CONSTRAINT_NONE,nodemask=(null),cpuset=user.slice,mems_allowed=0,global_oom,task_memcg=/user.slice/user-1000.slice/session-6.scope,task=java,pid=2196,uid=1000
[12382.618040] Out of memory: Killed process 2196 (java) total-vm:11955096kB, anon-rss:1505916kB, file-rss:2104kB, shmem-rss:0kB, UID:1000 pgtables:11260kB oom_score_adj:0
[12414.655510] [ 2238] 1000 2238 2988774 376399 11526144 1029403 0 java
[12414.655519] oom-kill:constraint=CONSTRAINT_NONE,nodemask=(null),cpuset=user.slice,mems_allowed=0,global_oom,task_memcg=/user.slice/user-1000.slice/session-6.scope,task=java,pid=2238,uid=1000
[12414.655611] Out of memory: Killed process 2238 (java) total-vm:11955096kB, anon-rss:1503660kB, file-rss:1936kB, shmem-rss:0kB, UID:1000 pgtables:11256kB oom_score_adj:0
[12429.314036] [ 2284] 1000 2284 2988774 376731 11526144 1029434 0 java
dominic@thmc-prod:~/server$ sudo dmesg | grep java
[sudo] password for dominic:
[12382.617922] [ 2196] 1000 2196 2988774 376935 11530240 1029664 0 java
[12382.617931] oom-kill:constraint=CONSTRAINT_NONE,nodemask=(null),cpuset=user.slice,mems_allowed=0,global_oom,task_memcg=/user.slice/user-1000.slice/session-6.scope,task=java,pid=2196,uid=1000
[12382.618040] Out of memory: Killed process 2196 (java) total-vm:11955096kB, anon-rss:1505916kB, file-rss:2104kB, shmem-rss:0kB, UID:1000 pgtables:11260kB oom_score_adj:0
[12414.655510] [ 2238] 1000 2238 2988774 376399 11526144 1029403 0 java
[12414.655519] oom-kill:constraint=CONSTRAINT_NONE,nodemask=(null),cpuset=user.slice,mems_allowed=0,global_oom,task_memcg=/user.slice/user-1000.slice/session-6.scope,task=java,pid=2238,uid=1000
[12414.655611] Out of memory: Killed process 2238 (java) total-vm:11955096kB, anon-rss:1503660kB, file-rss:1936kB, shmem-rss:0kB, UID:1000 pgtables:11256kB oom_score_adj:0
[12429.314036] [ 2284] 1000 2284 2988774 376731 11526144 1029434 0 java
nvm, adding large pages back into the mix worked
π’Ÿπ‘œπ“‚π’Ύπ“ƒπ’Ύπ’Έ
spark
spark is a performance profiler for Minecraft clients, servers, and proxies.
Admincraft Meta
Admincraft Metaβ€’3w ago
Spark Profile Analysis
❌ Processing Error
The bot cannot process this Spark profile. It appears that the platform is not supported for analysis. Platform: Fabric
Requested by _.dominic
π’Ÿπ‘œπ“‚π’Ύπ“ƒπ’Ύπ’Έ
AWS EC2 proxy, changed flags No issues so far nvm, just as I said it, another timeout @Rhythmatic as you have requested
Rhythmatic
Rhythmaticβ€’3w ago
πŸ‘€
π’Ÿπ‘œπ“‚π’Ύπ“ƒπ’Ύπ’Έ
I am using this if that matters
No description
Rhythmatic
Rhythmaticβ€’3w ago
What's your upload speed?
π’Ÿπ‘œπ“‚π’Ύπ“ƒπ’Ύπ’Έ
its gbit bidirectional at home and its also gbit bidirectional on my EC2 instance (via speedtest-cli)
Rhythmatic
Rhythmaticβ€’3w ago
Yeah, that's good. hmmm Do these timeouts happen to everyone or just certain people?
Rhythmatic
Rhythmaticβ€’3w ago
at the same time simultaneously, or just that it could be anyone at any given time?
π’Ÿπ‘œπ“‚π’Ύπ“ƒπ’Ύπ’Έ
Hm, I wonder if this is the issue
No description
Rhythmatic
Rhythmaticβ€’3w ago
Is that your router log?
π’Ÿπ‘œπ“‚π’Ύπ“ƒπ’Ύπ’Έ
randomly, so at any given time IDPS, yeah
Rhythmatic
Rhythmaticβ€’3w ago
but not everyone simultaneously okay
π’Ÿπ‘œπ“‚π’Ύπ“ƒπ’Ύπ’Έ
the IP is from my client pc to the proxy server very interesting
Rhythmatic
Rhythmaticβ€’3w ago
This is getting a bit outside of my wheelhouse. @Snow Kit you good with networking? or can think of someone who is?
π’Ÿπ‘œπ“‚π’Ύπ“ƒπ’Ύπ’Έ
I'll try disabling that specific rule and see if it helps
Rhythmatic
Rhythmaticβ€’3w ago
yeah give it a try if not, I can try to summon a turbo nerd
Snow Kit
Snow Kitβ€’3w ago
I see how it is
Rhythmatic
Rhythmaticβ€’3w ago
you didn't answer, turbo nerd
π’Ÿπ‘œπ“‚π’Ύπ“ƒπ’Ύπ’Έ
however those packets being blocked doesnt seem to affect my gameplay
Rhythmatic
Rhythmaticβ€’3w ago
Or alternatively, doesn't seem to affect your gameplay all of the time. Maybe there's some critical mass of blocked packets that results in a timeout TCP does tend to resend packets that get lost
Snow Kit
Snow Kitβ€’3w ago
I had to read context, smh
Rhythmatic
Rhythmaticβ€’3w ago
imagine not being omniscient and omnipresent, smh
π’Ÿπ‘œπ“‚π’Ύπ“ƒπ’Ύπ’Έ
I'll just afk a while on the server while I go have my dinner, and pray the issue is solved
π’Ÿπ‘œπ“‚π’Ύπ“ƒπ’Ύπ’Έ
I guess there is more problem than just a timeout
No description
Rhythmatic
Rhythmaticβ€’3w ago
lmao
π’Ÿπ‘œπ“‚π’Ύπ“ƒπ’Ύπ’Έ
https://spark.lucko.me/WDPFuWym6B and the spark profiler with another player
spark
spark is a performance profiler for Minecraft clients, servers, and proxies.
Admincraft Meta
Admincraft Metaβ€’3w ago
Spark Profile Analysis
❌ Processing Error
The bot cannot process this Spark profile. It appears that the platform is not supported for analysis. Platform: Fabric
Requested by _.dominic
Rhythmatic
Rhythmaticβ€’3w ago
I'm really concerned about your physical memory being almost full and your server swapping memory. What all are you running on that box? There's no way it's only Minecraft on fresh Ubuntu. And you should really turn Ubuntu's swappiness down to 0.
π’Ÿπ‘œπ“‚π’Ύπ“ƒπ’Ύπ’Έ
ah i forgot about that it is actually a fresh ubuntu vm, with 4gb overhead
Rhythmatic
Rhythmaticβ€’3w ago
Are you running like a full GUI on it?
Rhythmatic
Rhythmaticβ€’3w ago
that is not an answer
π’Ÿπ‘œπ“‚π’Ύπ“ƒπ’Ύπ’Έ
so, I guess not? full cli based with no GUI
Rhythmatic
Rhythmaticβ€’3w ago
The distro and variant do not imply the presence of-- Okay, thanks. So how the fuck do you have 4GB of overhead? That's astronomical. It should be like 200MB.
π’Ÿπ‘œπ“‚π’Ύπ“ƒπ’Ύπ’Έ
jvm uses 8192M, but the VM is given 12gbs
Rhythmatic
Rhythmaticβ€’3w ago
yesssss...?
Rhythmatic
Rhythmaticβ€’3w ago
No description
Rhythmatic
Rhythmaticβ€’3w ago
but that shows that it's almost all being used
π’Ÿπ‘œπ“‚π’Ύπ“ƒπ’Ύπ’Έ
Might have something to do with my huge pages reserve
Rhythmatic
Rhythmaticβ€’3w ago
eh, I guess it doesn't matter. if nothing else is running on it, I suppose it's probably just memory cache we'll ignore that for now change swappiness for sure
Rhythmatic
Rhythmaticβ€’3w ago
Now that I double check, I don't think that's part of normal Aikar's flags. What's the rationale for that?
π’Ÿπ‘œπ“‚π’Ύπ“ƒπ’Ύπ’Έ
nope, that is indeed not a part of the regular aikar's flags I was using hiltty's flags before moving over to flags.sh I just had large pages reserved, so using it here too
Rhythmatic
Rhythmaticβ€’3w ago
Gotcha. I won't advise one way or another on that, as I don't have data or experience to support any particular recommendation.
π’Ÿπ‘œπ“‚π’Ύπ“ƒπ’Ύπ’Έ
https://www.reddit.com/r/technicalfactorio/comments/mvn88v/over_20_actually_30_performance_gain_by_using/ I did see this while trying to find out on whether or not I should use huge (or large) pages
Reddit
From the technicalfactorio community on Reddit: over 20% (actually ...
Explore this post and more from the technicalfactorio community
Rhythmatic
Rhythmaticβ€’3w ago
Yeah, but that's not Java. So.
π’Ÿπ‘œπ“‚π’Ύπ“ƒπ’Ύπ’Έ
afaik factorio also runs on a java based server but ye wait does it
Tamz
Tamzβ€’3w ago
try removing antixray
Rhythmatic
Rhythmaticβ€’3w ago
I saw "malloc" which to me, means C or C++ *waves* thanks for answering my call
Tamz
Tamzβ€’3w ago
:wave_animated: i just read it and wanted to see whats up im personally suffering myself setting up another program lol @π’Ÿπ‘œπ“‚π’Ύπ“ƒπ’Ύπ’Έ ?
Rhythmatic
Rhythmaticβ€’3w ago
the mod
Tamz
Tamzβ€’3w ago
^
Rhythmatic
Rhythmaticβ€’3w ago
Antixrays tend to work by manipulating packet data. And they do be heavy af.
Tamz
Tamzβ€’3w ago
i forgot the main reason but somewhere in bloom docs i remember reading on antixray being a source of ping lag or ping inflation https://docs.bloom.host/extras/ping-issues/#paper-anti-xray-engine-mode-2 yep here
π’Ÿπ‘œπ“‚π’Ύπ“ƒπ’Ύπ’Έ
very interesting indeed
Tamz
Tamzβ€’3w ago
anyways im going to continue suffering putting serverpack creator on my pterodactyl instance @ me if it worked or not
π’Ÿπ‘œπ“‚π’Ύπ“ƒπ’Ύπ’Έ
So far not seeing timeouts from me nor other players after disabling the IDPS rule
Rhythmatic
Rhythmaticβ€’3w ago
Niiiiiice. Might've been false pos-ing a Minecraft packet are pings better in spark now, too?
ProGamingDk
ProGamingDkβ€’3w ago
Right until packetloss/it drops the keepalive packet
Rhythmatic
Rhythmaticβ€’3w ago
That was my guess too. Or there's a finite number of those packets that TCP allows the connection to survive, but if it does one too many, poof.
ProGamingDk
ProGamingDkβ€’3w ago
Would mean users actions wouldnt happen for a few seconds before kick probably Which doesnt sound to be the case
Rhythmatic
Rhythmaticβ€’3w ago
See, this is why I tell people that Staff != smart.
ProGamingDk
ProGamingDkβ€’3w ago
Nah its not staff its just that youre old sir
π’Ÿπ‘œπ“‚π’Ύπ“ƒπ’Ύπ’Έ
spark
spark is a performance profiler for Minecraft clients, servers, and proxies.
Admincraft Meta
Admincraft Metaβ€’3w ago
Spark Profile Analysis
❌ Processing Error
The bot cannot process this Spark profile. It appears that the platform is not supported for analysis. Platform: Fabric
Requested by _.dominic
π’Ÿπ‘œπ“‚π’Ύπ“ƒπ’Ύπ’Έ
*an older profiler my old proxy was in frankfurt
Rhythmatic
Rhythmaticβ€’3w ago
I meant better since fixing the IDPS filter seeing one from 3-4 days ago is...not much help lol
π’Ÿπ‘œπ“‚π’Ύπ“ƒπ’Ύπ’Έ
Will mark as solved until further issues arise Thanks for the input
Admincraft Meta
Admincraft Metaβ€’3w ago
Closed post!
Your post has been marked as solved!
Requested by _.dominic#0

Did you find this page helpful?