Minecraft process killed on VDS
-
- This is my homepage
- Posts: 157
- https://www.youtube.com/channel/UC40BgXanDqOYoVCYFDSTfHA
- Joined: Mon Jul 07, 2008 1:47 pm
Re: Minecraft process killed on VDS
This thread is a good read on increasing your performance.
http://www.minecraftforum.net/viewtopic ... 12&t=68128
I also used a script to auto restart the server once a day with a cronjob.
http://www.minecraftforum.net/viewtopic ... 12&t=68128
I also used a script to auto restart the server once a day with a cronjob.
Re: Minecraft process killed on VDS
That thread seems to be the holy grail of server performance.. im surprised i hadnt seen it before. I will be trying those tweaks shortly. Thanks!
Re: Minecraft process killed on VDS
Oh and is there a way you could share the script you are using, or point me to the right direction? There are so many different scripts out there that im not sure which one is reliable :/
Re: Minecraft process killed on VDS
Code: Select all
#!/bin/bash
/usr/bin/screen -x minecraft -X -p0 stuff "`printf "say Server is restarting in 60 seconds\r"`"
/bin/sleep 29
/usr/bin/screen -x minecraft -X -p0 stuff "`printf "say Server is restarting in 30 seconds\r"`"
/bin/sleep 24
/usr/bin/screen -x minecraft -X -p0 stuff "`printf "say Server is restarting in 5 seconds\r"`"
/bin/sleep 1
/usr/bin/screen -x minecraft -X -p0 stuff "`printf "say Server is restarting in 4 seconds\r"`"
/bin/sleep 1
/usr/bin/screen -x minecraft -X -p0 stuff "`printf "say Server is restarting in 3 seconds\r"`"
/bin/sleep 1
/usr/bin/screen -x minecraft -X -p0 stuff "`printf "say Server is restarting in 2 seconds\r"`"
/bin/sleep 1
/usr/bin/screen -x minecraft -X -p0 stuff "`printf "say Server is restarting in 1 seconds\r"`"
/bin/sleep 1
/usr/bin/screen -x minecraft -X -p0 stuff "`printf "stop\r"`"
/bin/sleep 10
/usr/bin/screen -fa -d -m -S minecraft /usr/bin/java -server -XX:+UseConcMarkSweepGC -XX:+UseParNewGC -XX:ParallelGCThreads=2 -Xnoclassgc -Xmx2816M -Xms2816M -jar Minecraft_Mod.jar nogui
For the cronjob to trigger the script, someone else will have to help ya (someone else did it for me).
Re: Minecraft process killed on VDS
I'm curious if you got your server running better and that script working. 

Re: Minecraft process killed on VDS
Ive yet to add that script, will do that tonight and see how it goes. I used the starting parameters mentioned in that thread you linked, and it does seem to run a bit better (i think). Problem is that I also upgraded server specs, so i can say for sure whether the tweaks themselves actually increased performance. Right now im running into problems with the CPU hitting 100% and hanging there forever every once in a while, making the server unresponsive and requiring a process kill. Im guessing there is a memory leak somewhere, or its running to full capacity :/
Re: Minecraft process killed on VDS
oh and im also getting this error, would you happen to be familiar with it?
at net.minecraft.server.PlayerManager.b(SourceFile:217)
at net.minecraft.server.ServerConfigurationManager.c(ServerConfigurationManager.java:85)
at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:490)
at net.minecraft.server.NetworkManager.a(SourceFile:236)
at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:65)
at net.minecraft.server.NetworkListenThread.a(SourceFile:104)
at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:261)
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:197)
at net.minecraft.server.ThreadServerApplication.run(SourceFile:512)
java.lang.IllegalStateException: Failed to remove player. net.minecraft.server.EntityPlayerMP@c73d9 isn't in chunk 37, 39
at net.minecraft.server.PlayerInstance.b(SourceFile:45)
at net.minecraft.server.PlayerManager.b(SourceFile:217)
at net.minecraft.server.ServerConfigurationManager.c(ServerConfigurationManager.java:85)
at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:490)
at net.minecraft.server.NetworkManager.a(SourceFile:236)
at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:65)
at net.minecraft.server.NetworkListenThread.a(SourceFile:104)
at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:261)
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:197)
at net.minecraft.server.ThreadServerApplication.run(SourceFile:512)
at net.minecraft.server.PlayerManager.b(SourceFile:217)
at net.minecraft.server.ServerConfigurationManager.c(ServerConfigurationManager.java:85)
at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:490)
at net.minecraft.server.NetworkManager.a(SourceFile:236)
at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:65)
at net.minecraft.server.NetworkListenThread.a(SourceFile:104)
at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:261)
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:197)
at net.minecraft.server.ThreadServerApplication.run(SourceFile:512)
java.lang.IllegalStateException: Failed to remove player. net.minecraft.server.EntityPlayerMP@c73d9 isn't in chunk 37, 39
at net.minecraft.server.PlayerInstance.b(SourceFile:45)
at net.minecraft.server.PlayerManager.b(SourceFile:217)
at net.minecraft.server.ServerConfigurationManager.c(ServerConfigurationManager.java:85)
at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:490)
at net.minecraft.server.NetworkManager.a(SourceFile:236)
at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:65)
at net.minecraft.server.NetworkListenThread.a(SourceFile:104)
at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:261)
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:197)
at net.minecraft.server.ThreadServerApplication.run(SourceFile:512)
Re: Minecraft process killed on VDS
I'm sorry but I'm not, I haven't been running a server for a couple weeks. I got tired of updates breaking all my mods, so I'm going to wait till Notch adds support.
Re: Minecraft process killed on VDS
okay my server is getting killed again, even after two ram upgrades :/
should I be safe by disabling the oom-killer? I just dont understand why it wont just slow down or cause lag, instead of killing the server. It would at least give some warning and enough time to react and save map etc. Its getting frustrating D:
Jan 23 22:40:12 minecraft kernel: [28032.380101] java invoked oom-killer: gfp_mask=0x201da, order=0, oom_adj=0
Jan 23 22:40:12 minecraft kernel: [28032.380104] java cpuset=/ mems_allowed=0
Jan 23 22:40:12 minecraft kernel: [28032.380109] Pid: 1097, comm: java Not tainted 2.6.32-24-server #43-Ubuntu
Jan 23 22:40:12 minecraft kernel: [28032.380111] Call Trace:
Jan 23 22:40:12 minecraft kernel: [28032.380120] [<ffffffff810b36bd>] ? cpuset_print_task_mems_allowed+0x9d/0xb0
Jan 23 22:40:12 minecraft kernel: [28032.380127] [<ffffffff810f6ee4>] oom_kill_process+0xd4/0x2f0
Jan 23 22:40:12 minecraft kernel: [28032.380129] [<ffffffff810f74a0>] ? select_bad_process+0xd0/0x110
Jan 23 22:40:12 minecraft kernel: [28032.380133] [<ffffffff810f7538>] __out_of_memory+0x58/0xc0
Jan 23 22:40:12 minecraft kernel: [28032.380137] [<ffffffff810f76ce>] out_of_memory+0x12e/0x1a0
Jan 23 22:40:12 minecraft kernel: [28032.380140] [<ffffffff8155aaee>] ? _spin_lock+0xe/0x20
Jan 23 22:40:12 minecraft kernel: [28032.380143] [<ffffffff810fa751>] __alloc_pages_slowpath+0x511/0x580
Jan 23 22:40:12 minecraft kernel: [28032.380149] [<ffffffff810fa931>] __alloc_pages_nodemask+0x171/0x180
Jan 23 22:40:12 minecraft kernel: [28032.380154] [<ffffffff8112d817>] alloc_pages_current+0x87/0xd0
Jan 23 22:40:12 minecraft kernel: [28032.380159] [<ffffffff810f46b7>] __page_cache_alloc+0x67/0x70
Jan 23 22:40:12 minecraft kernel: [28032.380162] [<ffffffff810fe289>] __do_page_cache_readahead+0xc9/0x210
Jan 23 22:40:12 minecraft kernel: [28032.380165] [<ffffffff810fe3f1>] ra_submit+0x21/0x30
Jan 23 22:40:12 minecraft kernel: [28032.380171] [<ffffffff810f5f7e>] filemap_fault+0x3fe/0x450
Jan 23 22:40:12 minecraft kernel: [28032.380175] [<ffffffff811127f4>] __do_fault+0x54/0x500
Jan 23 22:40:12 minecraft kernel: [28032.380180] [<ffffffff8101178c>] ? __switch_to+0x1ac/0x320
Jan 23 22:40:12 minecraft kernel: [28032.380185] [<ffffffff81115d38>] handle_mm_fault+0x1a8/0x3c0
Jan 23 22:40:12 minecraft kernel: [28032.380188] [<ffffffff810f43f0>] ? sync_page+0x0/0x50
Jan 23 22:40:12 minecraft kernel: [28032.380192] [<ffffffff81558780>] ? thread_return+0x48/0x418
Jan 23 22:40:12 minecraft kernel: [28032.380197] [<ffffffff8155d665>] do_page_fault+0x125/0x3b0
Jan 23 22:40:12 minecraft kernel: [28032.380199] [<ffffffff8155afb5>] page_fault+0x25/0x30
Jan 23 22:40:12 minecraft kernel: [28032.380201] Mem-Info:
Jan 23 22:40:12 minecraft kernel: [28032.380203] Node 0 DMA per-cpu:
Jan 23 22:40:12 minecraft kernel: [28032.380208] CPU 0: hi: 0, btch: 1 usd: 0
Jan 23 22:40:12 minecraft kernel: [28032.380209] CPU 1: hi: 0, btch: 1 usd: 0
Jan 23 22:40:12 minecraft kernel: [28032.380211] CPU 2: hi: 0, btch: 1 usd: 0
Jan 23 22:40:12 minecraft kernel: [28032.380212] Node 0 DMA32 per-cpu:
Jan 23 22:40:12 minecraft kernel: [28032.380214] CPU 0: hi: 186, btch: 31 usd: 115
Jan 23 22:40:12 minecraft kernel: [28032.380219] CPU 1: hi: 186, btch: 31 usd: 137
should I be safe by disabling the oom-killer? I just dont understand why it wont just slow down or cause lag, instead of killing the server. It would at least give some warning and enough time to react and save map etc. Its getting frustrating D:
Jan 23 22:40:12 minecraft kernel: [28032.380101] java invoked oom-killer: gfp_mask=0x201da, order=0, oom_adj=0
Jan 23 22:40:12 minecraft kernel: [28032.380104] java cpuset=/ mems_allowed=0
Jan 23 22:40:12 minecraft kernel: [28032.380109] Pid: 1097, comm: java Not tainted 2.6.32-24-server #43-Ubuntu
Jan 23 22:40:12 minecraft kernel: [28032.380111] Call Trace:
Jan 23 22:40:12 minecraft kernel: [28032.380120] [<ffffffff810b36bd>] ? cpuset_print_task_mems_allowed+0x9d/0xb0
Jan 23 22:40:12 minecraft kernel: [28032.380127] [<ffffffff810f6ee4>] oom_kill_process+0xd4/0x2f0
Jan 23 22:40:12 minecraft kernel: [28032.380129] [<ffffffff810f74a0>] ? select_bad_process+0xd0/0x110
Jan 23 22:40:12 minecraft kernel: [28032.380133] [<ffffffff810f7538>] __out_of_memory+0x58/0xc0
Jan 23 22:40:12 minecraft kernel: [28032.380137] [<ffffffff810f76ce>] out_of_memory+0x12e/0x1a0
Jan 23 22:40:12 minecraft kernel: [28032.380140] [<ffffffff8155aaee>] ? _spin_lock+0xe/0x20
Jan 23 22:40:12 minecraft kernel: [28032.380143] [<ffffffff810fa751>] __alloc_pages_slowpath+0x511/0x580
Jan 23 22:40:12 minecraft kernel: [28032.380149] [<ffffffff810fa931>] __alloc_pages_nodemask+0x171/0x180
Jan 23 22:40:12 minecraft kernel: [28032.380154] [<ffffffff8112d817>] alloc_pages_current+0x87/0xd0
Jan 23 22:40:12 minecraft kernel: [28032.380159] [<ffffffff810f46b7>] __page_cache_alloc+0x67/0x70
Jan 23 22:40:12 minecraft kernel: [28032.380162] [<ffffffff810fe289>] __do_page_cache_readahead+0xc9/0x210
Jan 23 22:40:12 minecraft kernel: [28032.380165] [<ffffffff810fe3f1>] ra_submit+0x21/0x30
Jan 23 22:40:12 minecraft kernel: [28032.380171] [<ffffffff810f5f7e>] filemap_fault+0x3fe/0x450
Jan 23 22:40:12 minecraft kernel: [28032.380175] [<ffffffff811127f4>] __do_fault+0x54/0x500
Jan 23 22:40:12 minecraft kernel: [28032.380180] [<ffffffff8101178c>] ? __switch_to+0x1ac/0x320
Jan 23 22:40:12 minecraft kernel: [28032.380185] [<ffffffff81115d38>] handle_mm_fault+0x1a8/0x3c0
Jan 23 22:40:12 minecraft kernel: [28032.380188] [<ffffffff810f43f0>] ? sync_page+0x0/0x50
Jan 23 22:40:12 minecraft kernel: [28032.380192] [<ffffffff81558780>] ? thread_return+0x48/0x418
Jan 23 22:40:12 minecraft kernel: [28032.380197] [<ffffffff8155d665>] do_page_fault+0x125/0x3b0
Jan 23 22:40:12 minecraft kernel: [28032.380199] [<ffffffff8155afb5>] page_fault+0x25/0x30
Jan 23 22:40:12 minecraft kernel: [28032.380201] Mem-Info:
Jan 23 22:40:12 minecraft kernel: [28032.380203] Node 0 DMA per-cpu:
Jan 23 22:40:12 minecraft kernel: [28032.380208] CPU 0: hi: 0, btch: 1 usd: 0
Jan 23 22:40:12 minecraft kernel: [28032.380209] CPU 1: hi: 0, btch: 1 usd: 0
Jan 23 22:40:12 minecraft kernel: [28032.380211] CPU 2: hi: 0, btch: 1 usd: 0
Jan 23 22:40:12 minecraft kernel: [28032.380212] Node 0 DMA32 per-cpu:
Jan 23 22:40:12 minecraft kernel: [28032.380214] CPU 0: hi: 186, btch: 31 usd: 115
Jan 23 22:40:12 minecraft kernel: [28032.380219] CPU 1: hi: 186, btch: 31 usd: 137
Re: Minecraft process killed on VDS
Disabling the OOM killer is generally a bad idea, but you could try it.
What command line are you starting the server with right now? What's the output of "free -m"?
What command line are you starting the server with right now? What's the output of "free -m"?
Re: Minecraft process killed on VDS
i start the server with a .sh file that contains
#!/bin/sh
java -server -Xmx2753M -XX:+UseConcMarkSweepGC -XX:+UseParNewGC -XX:+CMSIncrementalPacing -XX:ParallelGCThreads=2 -XX:+AggressiveOpts -jar craftbukkit.jar nogui
free -m currently shows
however before the kill, all swap values were at 0. I had already added swap some time ago with commands you gave me earlier in this thread, however this time around when i checked, they were back down to 0. Does this change persist through restarts or server migrations?
#!/bin/sh
java -server -Xmx2753M -XX:+UseConcMarkSweepGC -XX:+UseParNewGC -XX:+CMSIncrementalPacing -XX:ParallelGCThreads=2 -XX:+AggressiveOpts -jar craftbukkit.jar nogui
free -m currently shows
Code: Select all
total used free shared buffers cached
Mem: 3018 2996 21 0 37 265
-/+ buffers/cache: 2692 325
Swap: 999 0 999
Re: Minecraft process killed on VDS
To have the swap turned on again after a reboot, you would need to update /etc/fstab (or the equivalent file in Ubuntu, if they use a nonstandard one). When I had you add it before, that was mostly as a stop-gap/short-term test, but you should definitely finalize this -- and possibly switch to a larger swapfile size, as well.
If it's hitting the limit on RAM, I'd recommend running Minecraft with a lower memory limit, though. This will help you not just in preventing OOM errors (or the use of swap, which destroys performance), but will also allow the OS to cache reads and writes more, which could actually speed up the server's operation.
If it's hitting the limit on RAM, I'd recommend running Minecraft with a lower memory limit, though. This will help you not just in preventing OOM errors (or the use of swap, which destroys performance), but will also allow the OS to cache reads and writes more, which could actually speed up the server's operation.
Re: Minecraft process killed on VDS
what ram amount would you recommend? Im trying to run a 20 player server at the moment, so im looking at lowering it to 2497 or so? that should leave the OS with half a gig to operate (that enough?). I also thought it was 1gb of ram for every 10 players to run smoothly, but i guess not :/
Re: Minecraft process killed on VDS
oh and is -XX:ParallelGCThreads=2 supposed to match the number of cores we have?
Re: Minecraft process killed on VDS
You might try 2500, yes.
There's no hard and fast rule for the amount of RAM needed for each player in order to have a high-performance server. The technical minimum is 30-something MB, according to Notch, but generally much more than that is needed in order to avoid constantly having to reload world chunks. Exactly how much depends on what your players are doing and the size of your world.
-XX:ParallelGCThreads=2 is an unofficial optimization and you could play with its value to find the best one for you, but yes, you'll likely want it to match the number of CPU cores available.
There's no hard and fast rule for the amount of RAM needed for each player in order to have a high-performance server. The technical minimum is 30-something MB, according to Notch, but generally much more than that is needed in order to avoid constantly having to reload world chunks. Exactly how much depends on what your players are doing and the size of your world.
-XX:ParallelGCThreads=2 is an unofficial optimization and you could play with its value to find the best one for you, but yes, you'll likely want it to match the number of CPU cores available.