"Server can't keep up", how to fix?

  • Please make sure you are posting in the correct place. Server ads go here and modpack bugs go here

Anhrak

New Member
Jul 29, 2019
141
0
0
Yesterday we were playing all fine on the server, a friend did some target-practice game, we had lots of fun (and lots of deaths too xD). But around an hour after that, the server started to lag. Blocks refused to disappear for 10 tries, chests took a long while to open, but strangely some teleports are working perfectly fine.

I spoke with the server owner, and he's saying the server is spewing out errors of "Can't keep up!". The server has 8gb ram dedicated to it already, and we tried resetting/updating. But it's still occuring!

Any tips on other ways we can fix this problem, or what might cause it? We got a tick delay of 200 to 1.000.
 

erindalc

Popular Member
Mar 3, 2015
992
512
109
Steam
Yesterday we were playing all fine on the server, a friend did some target-practice game, we had lots of fun (and lots of deaths too xD). But around an hour after that, the server started to lag. Blocks refused to disappear for 10 tries, chests took a long while to open, but strangely some teleports are working perfectly fine.

I spoke with the server owner, and he's saying the server is spewing out errors of "Can't keep up!". The server has 8gb ram dedicated to it already, and we tried resetting/updating. But it's still occuring!

Any tips on other ways we can fix this problem, or what might cause it? We got a tick delay of 200 to 1.000.
Restarting the server will help fix the problem, but ultimately it is the server's performance.

Sent from my XT1028 using Tapatalk
 

Anhrak

New Member
Jul 29, 2019
141
0
0
Restarting the server didn't solve it. We did that two times already. And the server is very strong, it runs on a custom-applied OCTAcore with 32GB ram, where at least 8GB is dedicated to running FTB.
 

erindalc

Popular Member
Mar 3, 2015
992
512
109
Steam
Restarting the server didn't solve it. We did that two times already. And the server is very strong, it runs on a custom-applied OCTAcore with 32GB ram, where at least 8GB is dedicated to running FTB.
Possibly a bunch of mobs somewhere, use opis to figure it out. There's plenty of tutorials on how to do that.

Sent from my XT1028 using Tapatalk
 

Anhrak

New Member
Jul 29, 2019
141
0
0
Thanks, we'll try finding that one out. Any other mentionsworthy tips/possibilities?
 

BrickVoid

Well-Known Member
Dec 2, 2012
593
57
54
If your admin has access to them, have them check the server logs, and enable logging for a little bit if it's not already enabled, to see if that gives you any clues as to the problem. Also please remember that more memory is not necessarily good, what the server admin needs to worry about is the java or javascript garbage collection routines it runs. If you have 8GB running the modded Minecraft installation and have 7 people playing, it's probably doing a lot of garbage collection tasks. These occur because Minecraft constantly has to evaluate whether a loaded object or construct is needed in memory, and if there are a lot of them, the server starts taking them out, and can cause a lot of lag cleaning them all up. This can even lag a 8GB memory setup, due to the fact that you have 7x the normal amount of players a single-player world would have to deal with. I would hazard a guess and say that it's probably because people are doing a lot of exploring on the server. Or it's because someone is using a quarry or lag generating setup of some sort, and doesn't know it. Usually the server logs will tell the administrator what is going on behind the scenes, and they'll be able to fix the problem based on that and a bit of research.

Things to avoid: Excessively large amounts of entities on the ground. If you have a mob trap and items you don't want are simply discarded on the ground, this means they have to wait out a 5 minute despawn timer, which is bad for a server, much better to have everything collected soon as it drops from the mob, and sorted into a trashcan or other excess item removal device.

Large or complicated AE2 systems: I don't know how good your friends are at building AE2 systems, but be cautious as if they build a complicated setup, it can cause lag, if excessively overdone, it can cause a moderate amount of lag, which will contribute to your problem.

Inefficient item processing setups: If a system is designed to process and store items, it needs to be efficient at what it's processing, and prevent items from taking multiple trips through the same machines, and have routes that preferably favor an optimal design layout. If it's just a jumble of pipes hastily tacked together, it may cause lots of extra lag due to the amount of extra computations needed to handle the design. Always review item processing setups and make sure that they're as efficient as possible.

Chunkloaded fluid pumps: Believe it or not, this can be a major source of lag from the Nether. A lot of people like to go to the Nether and set up a pump to pull lava from the Nether into a dimensional teleportation device and use it to power their initial machine setups until they get more complicated options going. All of that lava being pumped out generates lag due to the updates needed for each source block of lava being removed. If a lot of people are using lava for power generation, it may be simpler to use a Creative lava tank and a transfer mechanism or alternative power sources. The admin would have to set up the Creative lava tank, and set things up so everyone can pump from it.

Those are just a few things I could think of off the top of my head, it's highly likely you may be missing a simple problem, which will of course require an equally simple solution. Hope that helps! :D

Cheers ...

BrickVoid
 
  • Like
Reactions: Wagon153 and Anhrak

Baaleos

New Member
Jul 29, 2019
100
0
0
If players were exploring outwards from the spawn at the time of the lag- the lag may be due to chunk generation.
One method of solving chunk generation lag is to pre-generate the landmass.
Eg: Pregen 500 chunks in each direction of spawn.

Then those areas will load without causing subsequent lag in other aspects of the server.

If however the lag was not associated with chunk gen, then it could be entities using up tps
 

Kevin van Rijzewijk

New Member
Jul 29, 2019
10
0
0
You don't give much info about the cause of the problem.
What was the target practice? Shooting with fire or something?
It might be you have set dozens of forrests on fire somewhere..
All the fire causes a lot of lag.
Did you guys blow a lot of holes in the ground? = lag
 

Anhrak

New Member
Jul 29, 2019
141
0
0
@Kevin, that's the problem; we don't know what was causing it.

The target practice was just experimenting my new TiC crossbow.
 

Tyrindor

New Member
Jul 29, 2019
331
0
0
Make sure its not chunk generation... You can't fix chunk generation lag in my experience, I've connected up a extremely overclocked 6 core i7 and with 64GB of RAM. It still happens, after you get a good amount of chunks generated it typically isn't a problem.

On a big server with lots of people, someone is typically exploring, so it happens a lot.
 

GreenZombie

New Member
Jul 29, 2019
2,402
-1
0
Yesterday we were playing all fine on the server, a friend did some target-practice game, we had lots of fun (and lots of deaths too xD). But around an hour after that, the server started to lag. Blocks refused to disappear for 10 tries, chests took a long while to open, but strangely some teleports are working perfectly fine.

I spoke with the server owner, and he's saying the server is spewing out errors of "Can't keep up!". The server has 8gb ram dedicated to it already, and we tried resetting/updating. But it's still occuring!

Any tips on other ways we can fix this problem, or what might cause it? We got a tick delay of 200 to 1.000.


95% of the work a server has to do is in the processing of entities or tile entities in chunks. If the chunks that contain the offending entities are not loaded then the server should not be suffering from tps lag.

So, if everyone logs out, all the chunks that are loaded to support each players location should unload. If the server is still spitting out could not keep up messages with no one on, then the cause is most likely related to chunks that are getting stuck in memory (restart the server) or being explicitly loaded (remove chunk loaders) or implicitly loaded (investigate the area near spawn to see what might be causing lag there).

Get the admin to install / enable opis on the server - players with OP can run /opis from the client console to get a report about all tile entities, entities and dimensions, Click "Start Profile" in the window that pops up and the bundled mapwriter map will get overlays showing loaded chunks, and highlight chuncks that contain entities that are taking an exceptionally long time to process.

I've had some worlds tank for completely vanilla reasons:
* One server died until we discovered a village near a base had a naturally formed villager generator that had literally caused thousands of villagers to spawn in a room. Setting some zombies on them resolved the low tps.
* A different server had a constant low tps that seemed inexplicable until a simple sheep pen was identified as the cause. Too many sheep in a confined space were constantly colliding and pushing each other into walls and trying to path to areas they could not reach. Letting the sheep out sorted the tps.
* an earlier server had a dungeon close to a players base. The spawner kept spawning mobs that wandered away allowing yet more to be spawned.
* The server with the sheep pen also suffered problems due to Thaumcraft's Arcane Lamp - that at the time was using tile entities for its arcane lamp light motes. We had lit up an area and there were literally 16,000 light motes being processed. An update to TC thankfully solved that.
* Possibly the same server - someone had built a mob farm with a mod that caused xp orbs to be spawned, but no player was present to collect the orbs. XP orbs take a few minutes to fade and the mob farm was killing mobs fast enough that the literally thousands of orbs were, again, causing the server to lag out.