PaperMC / Paper

The most widely used, high performance Minecraft server that aims to fix gameplay and mechanics inconsistencies
https://papermc.io/
Other
9.89k stars 2.29k forks source link

Memory leak Related to Criterion Triggers #3261

Closed plebexer closed 4 years ago

plebexer commented 4 years ago

*Timings link: https://timings.aikar.co/?id=8627dda9fdc44c48b02e6d52f51790d0#plugins

*Description of issue: Hey! i have been almost a week searching for information on what could be causing this, and i tried everything i found, i tried removing datapacks from my world folder, i removed all of my players advancements data (i tought it could be corrupted) and i even tried removing some plugins i tought they could be doing something, i know some plugins i already have are not that well optimized but i will be replacing them in the future.

Plugin list: Plugins (67): AdvancedAbilities, AdvancedTPA, AFKPlus, ajParkour, antiRedstoneClock, ArmorStandTools, BetterSleeping, BloodMoon, ChatManager, ChatReaction, ChestLockGui, CommandPanels, CoreProtect, CraftingStore, CustomCrafting, DangerousCaves, DiscordSRV, DragonEggDrop, EconomyMain, EpicBackpacks, ExploitFixer, FastAsyncWorldEdit, Graves, Hat, IllegalStack, Insights, InventoryRollback, InvSee, Jobs, JoinFullServer, LiteBans, LuckPerms, MeteoritesPro, MoreSounds, MovingDevApi, Multiverse-Core, Multiverse-NetherPortals, PacketLimiter, PermissionGamemode, PL-Hide-Pro, PlaceholderAPI, ProtectionStones, ProtocolLib, Randomizer, RandomTeleport, RecipeControl, ServerBooster, SetSpawn, Skript, skript-mirror, spark, StopNetherTrap, SuperVanish, TAB, TrHologram, UltimateHomes, UltimateKits, Vault, VeryDangerousNether, Votifier, VotingPlugin, WitherAC, WolfyUtilities, WorldBorder, WorldEdit, WorldGuard, zAuctionHouseV2*

*bukkit.yml, spigot.yml, paper.yml, server.properties: bukkit.yml: spigot.yml: paper.yml: server.properties: https://pastebin.com/77FJABhx

*Other helpful links Link to download a heap dump i made (it was made just after the timings i sent) Poybox (883.48 MB) https://www.poybox.com/#541210c654e3b56cfadc4bdfe83f502b

*Paper build number: This server is running Paper version git-Paper-227 (MC: 1.15.2) (Implementing API version 1.15.2-R0.1-SNAPSHOT) Previous version: git-Paper-226 (MC: 1.15.2)

Trigary commented 4 years ago

Haven't looked at the heap dump, but might be related: https://github.com/PaperMC/Paper/issues/3050

plebexer commented 4 years ago

already tried disabling advancement saving, it started to lag anyways i made a heapdump and the same thing popped up, i dont think it is related.

HauserGrim commented 4 years ago

If you generated world using WorldBorder, try removing chunks.dat from world/data (world_nether/DIM-1/data, world_the_end\DIM1\data) Remember to stop the server first.

plebexer commented 4 years ago

Removing that data is something secure to do?, I mean won't some chunks get deleted?

aikar commented 4 years ago

Don't remove that file, it is your force loaded chunks data.

plebexer commented 4 years ago

then what i can do about this? i saw some other people had the same problem too

electronicboy commented 4 years ago

Being perfectly honest, there is two irks here 1) The times that I've often cared to try to run over the heap dump, the leak has been induced by a plugin, not to mention the hells of running over this because #2 2) Mojangs implementation of storing this data is far from amazing and literally eats resources, that's something mojang would need to fix

plebexer commented 4 years ago

if one plugin i have is causing this, is there a way i can know wich plugin is?, i already deleted lots of plugins trying to figure out if any of them was doing anything, and i cant find anything on the heap dump, and if it is mojang fault is there a way to completely disable achievements so this wont happen?, i prefer to disable them than having tps under 10.

electronicboy commented 4 years ago

You'd need to disable advancements in spigot.yml and remove the existing data for them

plebexer commented 4 years ago

i tried doing advancements: disable-saving: true disabled:

HauserGrim commented 4 years ago

In 1.13+, WorldBorder works very poorly. It leaves incompletely generated chunks and many force loaded chunks. The number of force loaded chunks can consume a lot of RAM after using WB.

plebexer commented 4 years ago

i have pregenerated my world a while agoe and that never caused problems, anyways, i think i fixed the criterion triggers problem, i still have low tps with 50 players, but i think that is a problem of jobs reborn that just works so bad.

aikar commented 4 years ago

I looked into the heap dump and code. There is not actually a leak here. The server does clean up correctly on disconnect.

High memory use was purely due to it storing every logged in players advancement data. Your only option is to disable saving advancements which effectively disables the games feature... and even then it wont stop memory for THAT session, just wont come back when they relog making them start over.