Jump to content

Can't keep up! Is the server overloaded?


naumoff

Recommended Posts

Hello there! I'm not sure if I'm writing to the right topic, but I'm having a problem with the Minecraft server. The load on the server processor is less than 40%, but the Minecraft server lags very much with an error: "Can't keep up! Is the server overloaded? Running 14659ms or 293 ticks behind". At this moment I am on the server alone.
There are only 15 mods installed on the server:

Quote

Alex's Mobs
Artifacts
Citadel
Curios API
ExpandAbility
Falling Tree
Ice and Fire
Iron Chests
Iron Furnaces
Just Enough Items
TLSkinMod
ToroHealth Damage Indicators
Traveller's Backpack
The Twilight Forest
Xaero's Minimap

Also, once my server crashed. I attach the logs.
I have the recommended version "forge-1.16.5-36.1.0.jar" installed on my server.
Server characteristics: 8 GB Memory / 4 Intel vCPUs / 160 GB Disk.
I don't know how you can help me, but I decided to try my luck and write here. Thanks a lot in advance!
If you need more information, please ask me.

crash-2021-07-13_04.21.31-server.txt

Edited by naumoff
Link to comment
Share on other sites

The situation improved a little when I installed the latest version of the "Ice and Fire" mod, but there are still lags. Now the error "Can't keep up! Is the server overloaded?" is written much less often, but another error appeared: "player moved too quickly!", which made it almost impossible to move around the world.

Quote

[22:27:42] [Server thread/WARN] [minecraft/EntityDataManager]: defineId called for: class com.github.alexthe666.iceandfire.entity.EntityDragonBase from class com.github.alexthe666.iceandfire.entity.EntityLightningDragon
[22:27:42] [Server thread/WARN] [minecraft/EntityDataManager]: defineId called for: class com.github.alexthe666.iceandfire.entity.EntityDragonBase from class com.github.alexthe666.iceandfire.entity.EntityLightningDragon
[22:27:42] [Server thread/WARN] [minecraft/EntityDataManager]: defineId called for: class com.github.alexthe666.iceandfire.entity.EntityDragonBase from class com.github.alexthe666.iceandfire.entity.EntityLightningDragon
[22:27:42] [Server thread/WARN] [minecraft/EntityDataManager]: defineId called for: class com.github.alexthe666.iceandfire.entity.EntityDragonBase from class com.github.alexthe666.iceandfire.entity.EntityLightningDragon
[22:27:48] [Server thread/WARN] [minecraft/MinecraftServer]: Can't keep up! Is the server overloaded? Running 2008ms or 40 ticks behind
[22:27:57] [Server thread/WARN] [minecraft/ServerPlayNetHandler]: player moved too quickly! 9.940794178013789,-1.127890238205481,1.0335645639438553
[22:28:08] [Server thread/WARN] [minecraft/ServerPlayNetHandler]: player moved too quickly! 9.785573994629203,1.1661092609382138,2.1636089161856944
[22:28:14] [Server thread/WARN] [minecraft/ServerPlayNetHandler]: player moved too quickly! 9.726472322186964,2.164773281826072,1.7895358752814445
[22:28:20] [Server thread/WARN] [minecraft/ServerPlayNetHandler]: player moved too quickly! 10.144602241049256,1.9986640208878583,0.008243357354785985
[22:28:28] [Server thread/WARN] [minecraft/ServerPlayNetHandler]: player moved too quickly! 9.889900487736554,2.395575898673286,-0.22144524983673364
[22:28:34] [Server thread/WARN] [minecraft/ServerPlayNetHandler]: player moved too quickly! 10.33232332823934,1.4199999868869781,-0.7320723419413753


[22:42:53] [Server thread/WARN] [minecraft/Chunk]: Tried to load a DUMMY block entity @ BlockPos{x=-289, y=35, z=869} but found not block entity block Block{minecraft:stone} at location
[22:42:53] [Server thread/WARN] [minecraft/Chunk]: Tried to load a block entity for block Block{minecraft:stone} but failed at location BlockPos{x=-289, y=35, z=869}

Maybe someone knows why this could be?

Edited by naumoff
after tests
Link to comment
Share on other sites

13 hours ago, diesieben07 said:

Minecraft is mostly single threaded, i.e. it will only use one core.

What could be the reason for this error?

Quote

[20:07:28] [Server thread/WARN] [minecraft/Chunk]: Tried to load a DUMMY block entity @ BlockPos{x=822, y=29, z=342} but found not block entity block Block{minecraft:stone} at location
[20:07:28] [Server thread/WARN] [minecraft/Chunk]: Tried to load a block entity for block Block{minecraft:stone} but failed at location BlockPos{x=822, y=29, z=342}
[20:07:28] [Server thread/WARN] [minecraft/Chunk]: Tried to load a DUMMY block entity @ BlockPos{x=818, y=21, z=347} but found not block entity block Block{minecraft:stone} at location
[20:07:28] [Server thread/WARN] [minecraft/Chunk]: Tried to load a block entity for block Block{minecraft:stone} but failed at location BlockPos{x=818, y=21, z=347}
[20:07:28] [Server thread/WARN] [minecraft/Chunk]: Tried to load a DUMMY block entity @ BlockPos{x=811, y=21, z=347} but found not block entity block Block{minecraft:stone} at location
[20:07:28] [Server thread/WARN] [minecraft/Chunk]: Tried to load a block entity for block Block{minecraft:stone} but failed at location BlockPos{x=811, y=21, z=347}

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • I made a block entity in forge 1.20.1, I want to prevent hopper from taking input slot item, i tried to override the extractItem method, it prevented hopper from taking input slot item, but the player also unable to take/change the item in input slot unless the slot is empty. public class FluidSeparatorBlockEntity extends BlockEntity implements MenuProvider { private static final int INPUT_SLOT = 0; private final CustomItemHandler itemHandler = new CustomItemHandler(3){ @Override protected void onContentsChanged(int slot) { setChanged(); } @Override public boolean isItemValid(int slot, @NotNull ItemStack stack) { return slot == INPUT_SLOT; } @Override public @NotNull ItemStack extractItem(int slot, int amount, boolean simulate) { if (slot == INPUT_SLOT) { return ItemStack.EMPTY; } return super.extractItem(slot, amount, simulate); } }; private LazyOptional<IItemHandler> lazyItemHandler = LazyOptional.empty(); protected final ContainerData data; private int progress = 0; private int maxProgress = 78; public FluidSeparatorBlockEntity(BlockPos pPos, BlockState pBlockState) { super(ModBlockEntities.FLUID_SEPARATOR_BE.get(), pPos, pBlockState); this.data = new ContainerData() { @Override public int get(int pIndex) { return switch (pIndex) { case 0 -> FluidSeparatorBlockEntity.this.progress; case 1, 2 -> FluidSeparatorBlockEntity.this.maxProgress; default -> 0; }; } @Override public void set(int pIndex, int pValue) { switch (pIndex) { case 0 -> FluidSeparatorBlockEntity.this.progress = pValue; case 1, 2 -> FluidSeparatorBlockEntity.this.maxProgress = pValue; } } @Override public int getCount() { return 3; } }; } @Override public @NotNull <T> LazyOptional<T> getCapability(@NotNull Capability<T> cap, @Nullable Direction side) { if(cap == ForgeCapabilities.ITEM_HANDLER) { return lazyItemHandler.cast(); } return super.getCapability(cap, side); } @Override public void onLoad() { super.onLoad(); lazyItemHandler = LazyOptional.of(() -> itemHandler); } @Override public void invalidateCaps() { super.invalidateCaps(); lazyItemHandler.invalidate(); } public void drops() { SimpleContainer inventory = new SimpleContainer(itemHandler.getSlots()); for(int i = 0; i < itemHandler.getSlots(); i++) { inventory.setItem(i, itemHandler.getStackInSlot(i)); } Containers.dropContents(this.level, this.worldPosition, inventory); } @Override public Component getDisplayName() { return Component.translatable("block.chemmaster.fluid_separator"); } @Nullable @Override public AbstractContainerMenu createMenu(int pContainerId, Inventory pPlayerInventory, Player pPlayer) { return new FluidSeparatorMenu(pContainerId, pPlayerInventory, this, this.data); } @Override protected void saveAdditional(CompoundTag pTag) { pTag.put("inventory", itemHandler.serializeNBT()); pTag.putInt("fluid_separator.progress", progress); super.saveAdditional(pTag); } @Override public void load(CompoundTag pTag) { super.load(pTag); itemHandler.deserializeNBT(pTag.getCompound("inventory")); progress = pTag.getInt("fluid_separator.progress"); } public void tick(Level pLevel, BlockPos pPos, BlockState pState) { ItemStack inputStack = this.itemHandler.getStackInSlot(INPUT_SLOT); if (inputStack.getCount() < 2) { resetProgress(); return; } if(hasRecipe()) { increaseCraftingProgress(); setChanged(pLevel, pPos, pState); if(hasProgressFinished()) { craftItem(); resetProgress(); } } else { resetProgress(); } } private void resetProgress() { progress = 0; } private void craftItem() { Optional<FluidSeparatingRecipe> recipe = getCurrentRecipe(); if (recipe.isPresent()) { List<ItemStack> results = recipe.get().getOutputs(); ItemStack inputStack = this.itemHandler.getStackInSlot(INPUT_SLOT); if (inputStack.getCount() < 2) { // If there are not enough items, do not proceed with crafting return; } // Extract the input item from the input slot this.itemHandler.internalExtractItem(INPUT_SLOT, 2, false); // Loop through each result item and find suitable output slots for (ItemStack result : results) { int outputSlot = findSuitableOutputSlot(result); if (outputSlot != -1) { this.itemHandler.setStackInSlot(outputSlot, new ItemStack(result.getItem(), this.itemHandler.getStackInSlot(outputSlot).getCount() + result.getCount())); } else { // Handle the case where no suitable output slot is found // This can be logging an error, throwing an exception, or any other handling logic System.err.println("No suitable output slot found for item: " + result); } } } } private int findSuitableOutputSlot(ItemStack result) { // Implement logic to find a suitable output slot for the given result // Return the slot index or -1 if no suitable slot is found for (int i = 0; i < this.itemHandler.getSlots(); i++) { // Ensure we do not place the output item in the input slot if (i == INPUT_SLOT) { continue; } ItemStack stackInSlot = this.itemHandler.getStackInSlot(i); if (stackInSlot.isEmpty() || (stackInSlot.getItem() == result.getItem() && stackInSlot.getCount() + result.getCount() <= stackInSlot.getMaxStackSize())) { return i; } } return -1; } private boolean hasRecipe() { Optional<FluidSeparatingRecipe> recipe = getCurrentRecipe(); if (recipe.isEmpty()) { return false; } List<ItemStack> results = recipe.get().getOutputs(); for (ItemStack result : results) { if (!canInsertAmountIntoOutputSlot(result) || !canInsertItemIntoOutputSlot(result.getItem())) { return false; } } return true; } private Optional<FluidSeparatingRecipe> getCurrentRecipe(){ SimpleContainer inventory = new SimpleContainer(this.itemHandler.getSlots()); for (int i = 0; i < itemHandler.getSlots(); i++) { inventory.setItem(i, this.itemHandler.getStackInSlot(i)); } return this.level.getRecipeManager().getRecipeFor(FluidSeparatingRecipe.Type.INSTANCE, inventory, level); } private boolean canInsertAmountIntoOutputSlot(ItemStack result) { for (int i = 1; i < this.itemHandler.getSlots(); i++) { ItemStack stackInSlot = this.itemHandler.getStackInSlot(i); if (stackInSlot.isEmpty() || (stackInSlot.getItem() == result.getItem() && stackInSlot.getCount() + result.getCount() <= stackInSlot.getMaxStackSize())) { return true; } } return false; } private boolean canInsertItemIntoOutputSlot(Item item) { for (int i = 1; i < this.itemHandler.getSlots(); i++) { ItemStack stackInSlot = this.itemHandler.getStackInSlot(i); if (stackInSlot.isEmpty() || stackInSlot.getItem() == item) { return true; } } return false; } private boolean hasProgressFinished() { return progress >= maxProgress; } private void increaseCraftingProgress() { progress++; } }  
    • No dice. Unfortunately this fix didn't work, thank you though.
    • Maybe you need a rayon mod. https://www.curseforge.com/minecraft/mc-mods/rayon
    • Not sure what's going on the logs are making even less sense than usual to me. Any help would be much appreciated.   https://paste.ee/p/KBHyP#s=0
  • Topics

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.