Recent Discussions
[beginner] Server's java process randomly `>killed` at times
Unanswered
American black bear posted this in #questions
37 messages
0 views
American black bearOP
Everything seems to be ok for me, but sometimes the server suddenly closes and the console just returns ">Killed". someone or something is killing the process, but i can't figure out what.
I am running the server on an Azure VM, 4 Gigs of ram, with 3900 allotted to the java process. I know very little devops, any help would be greatly appreciated!
I am running the server on an Azure VM, 4 Gigs of ram, with 3900 allotted to the java process. I know very little devops, any help would be greatly appreciated!
American black bearOP
I only have the AuthMe plugin installed
@American black bear Everything seems to be ok for me, but sometimes the server suddenly closes and the console just returns ">Killed". someone or something is killing the process, but i can't figure out what.
I am running the server on an Azure VM, 4 Gigs of ram, with 3900 allotted to the java process. I know very little devops, any help would be greatly appreciated!
I am running the server on an Azure VM, 4 Gigs of ram, with 3900 allotted to the java process. I know very little devops, any help would be greatly appreciated!
Asiatic Lion
how do you make your server start?
i assume you log into vm and just run a
java -jar server.jar or whatever flags? it seems your mc server ran out of memory thus it killed itselfAmerican black bearOP
yea thats what I do
with byobu for process management
@Asiatic Lion i assume you log into vm and just run a
java -jar server.jar or whatever flags? it seems your mc server ran out of memory thus it killed itself American black bearOP
is there way to limit or containerize it so this doesnt happen?
Asiatic Lion
if i may ask are you sure 3.9 GB is enough for your mc server
assumption is that it is a mc server and not a proxy that you for some reason need to give that much ram
American black bearOP
Im not sure
I am only using this vm for the server so i was like dedicate the entire thing, why not
i am expecting a maximum of 8-10 people online at once
what is a safe limit to reduce the max memory to?
i really don't know how these things work
@American black bear i am expecting a maximum of 8-10 people online at once
Asiatic Lion
letme ask a better question or few:
- what version of mc
- are you using spigot or paper or its fork
- have you done pregeneration
- have you done any optimization?
- what version of mc
- are you using spigot or paper or its fork
- have you done pregeneration
- have you done any optimization?
@Asiatic Lion letme ask a better question or few:
- what version of mc
- are you using spigot or paper or its fork
- have you done pregeneration
- have you done any optimization?
- what version of mc
- are you using spigot or paper or its fork
- have you done pregeneration
- have you done any optimization?
American black bearOP
1.21.4
Paper (
no idea what pregeneration is
no optimizations either, could you help me point where i can learn to implement these things from
Paper (
[14:43:11 INFO]: This server is running Paper version 1.21.4-118-main@73f7736 (2025-01-18T13:37:35Z) (Implementing API version 1.21.4-R0.1-SNAPSHOT)no idea what pregeneration is
no optimizations either, could you help me point where i can learn to implement these things from
Asiatic Lion
Thats the issue
you cant really run 1.21.4 that well on 4 GB
American black bearOP
oh
what version could i downgrade to then
Asiatic Lion
well truth to be told its possible to run on 4 gb just that it wont work well as you can see. We can try to do optimization and see if your server works fine from there. one moment
https://paper-chan.moe/paper-optimization/ teaches you
American black bearOP
okay
thank you
is there any way to just prevent it from crashing when running out of memory, or implement auto restarts?
I'll optimize it first ofc
@American black bear is there any way to just prevent it from crashing when running out of memory, or implement auto restarts?
Asiatic Lion
are you using screen/tmux?
American black bearOP
byobu
its similar
Asiatic Lion
#!/bin/bash
while true; do
java -Xmx3800M -jar server.jar
echo "Restarting server in 10s."
sleep 10s
doneCreate a start.sh file and just ./start.sh
might need to chmod it
Loading...
Loading...