I goes up to YEAH BELIEVE IT 6gb usage, with only 1 player in. It worked great all day, but suddenly... BAM! And I get spammed with logs and everything. Code (Text): # # There is insufficient memory for the Java Runtime Environment to continue. # Native memory allocation (mmap) failed to map 4910481408 bytes for committing reserved memory. # Possible reasons: # The system is out of physical RAM or swap space # In 32 bit mode, the process size limit was hit # Possible solutions: # Reduce memory load on the system # Increase physical memory or swap space # Check if swap backing store is full # Use 64 bit Java on a 64 bit OS # Decrease Java heap size (-Xmx/-Xms) # Decrease number of Java threads # Decrease Java thread stack sizes (-Xss) # Set larger code cache with -XX:ReservedCodeCacheSize= # This output file may be truncated or incomplete. # # Out of Memory Error (os_linux.cpp:2627), pid=11305, tid=0x00007f6438e5d700 # # JRE version: (8.0_121-b13) (build ) # Java VM: Java HotSpot(TM) 64-Bit Server VM (25.121-b13 mixed mode linux-amd64 compressed oops) # Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again # --------------- T H R E A D --------------- Current thread (0x00007f6430009800): JavaThread "Unknown thread" [_thread_in_vm, id=11306, stack(0x00007f6438d5d000,0x00007f6438e5e000)] Stack: [0x00007f6438d5d000,0x00007f6438e5e000], sp=0x00007f6438e5c3c0, free space=1020k Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code) V [libjvm.so+0xac703a] VMError::report_and_die()+0x2ba V [libjvm.so+0x4fc7eb] report_vm_out_of_memory(char const*, int, unsigned long, VMErrorType, char const*)+0x8b V [libjvm.so+0x923c43] os::Linux::commit_memory_impl(char*, unsigned long, bool)+0x103 V [libjvm.so+0x924199] os::pd_commit_memory(char*, unsigned long, unsigned long, bool)+0x29 V [libjvm.so+0x91e4aa] os::commit_memory(char*, unsigned long, unsigned long, bool)+0x2a V [libjvm.so+0x992f03] PSVirtualSpace::expand_by(unsigned long)+0x53 V [libjvm.so+0x983017] PSOldGen::initialize(ReservedSpace, unsigned long, char const*, int)+0xb7 V [libjvm.so+0x2d89aa] AdjoiningGenerations::AdjoiningGenerations(ReservedSpace, GenerationSizer*, unsigned long)+0x39a V [libjvm.so+0x9472d6] ParallelScavengeHeap::initialize()+0x1d6 V [libjvm.so+0xa8eff3] Universe::initialize_heap()+0xf3 V [libjvm.so+0xa8f55e] universe_init()+0x3e V [libjvm.so+0x63d4f5] init_globals()+0x65 V [libjvm.so+0xa72c4e] Threads::create_vm(JavaVMInitArgs*, bool*)+0x23e V [libjvm.so+0x6d1d94] JNI_CreateJavaVM+0x74 C [libjli.so+0x745e] JavaMain+0x9e C [libpthread.so.0+0x76ba] start_thread+0xca --------------- P R O C E S S --------------- Java Threads: ( => current thread ) Other Threads: =>0x00007f6430009800 (exited) JavaThread "Unknown thread" [_thread_in_vm, id=11306, stack(0x00007f6438d5d000,0x00007f6438e5e000)] VM state:not at safepoint (not fully initialized) VM Mutex/Monitor currently owned by a thread: None GC Heap History (0 events): No events Deoptimization events (0 events): No events Internal exceptions (0 events): No events Events (0 events): No events Dynamic libraries: 00400000-00401000 r-xp 00000000 fd:01 513569 /usr/lib/jvm/java-8-oracle/jre/bin/java 00600000-00601000 rw-p 00000000 fd:01 513569 /usr/lib/jvm/java-8-oracle/jre/bin/java 025ba000-025db000 rw-p 00000000 00:00 0 [heap] 72db00000-7c0000000 rw-p 00000000 00:00 0 7f6421000000-7f6421270000 rwxp 00000000 00:00 0 7f6421270000-7f6430000000 ---p 00000000 00:00 0 7f6430000000-7f6430034000 rw-p 00000000 00:00 0 7f6430034000-7f6434000000 ---p 00000000 00:00 0 7f6434aaf000-7f6434d36000 rw-p 00000000 00:00 0 7f6434d36000-7f643565b000 ---p 00000000 00:00 0 7f643565b000-7f6435af9000 rw-p 00000000 00:00 0 7f6435af9000-7f6435eaf000 ---p 00000000 00:00 0 7f6435eaf000-7f6435ec9000 r-xp 00000000 fd:01 513317 /usr/lib/jvm/java-8-oracle/jre/lib/amd64/libzip.so 7f6435ec9000-7f64360c9000 ---p 0001a000 fd:01 513317 /usr/lib/jvm/java-8-oracle/jre/lib/amd64/libzip.so 7f64360c9000-7f64360ca000 rw-p 0001a000 fd:01 513317 /usr/lib/jvm/java-8-oracle/jre/lib/amd64/libzip.so 7f64360ca000-7f64360d5000 r-xp 00000000 fd:01 58084 /lib/x86_64-linux-gnu/libnss_files-2.23.so 7f64360d5000-7f64362d4000 ---p 0000b000 fd:01 58084 /lib/x86_64-linux-gnu/libnss_files-2.23.so 7f64362d4000-7f64362d5000 r--p 0000a000 fd:01 58084 /lib/x86_64-linux-gnu/libnss_files-2.23.so 7f64362d5000-7f64362d6000 rw-p 0000b000 fd:01 58084 /lib/x86_64-linux-gnu/libnss_files-2.23.so 7f64362d6000-7f64362dc000 rw-p 00000000 00:00 0 7f64362dc000-7f64362e7000 r-xp 00000000 fd:01 58077 /lib/x86_64-linux-gnu/libnss_nis-2.23.so 7f64362e7000-7f64364e6000 ---p 0000b000 fd:01 58077 /lib/x86_64-linux-gnu/libnss_nis-2.23.so 7f64364e6000-7f64364e7000 r--p 0000a000 fd:01 58077 /lib/x86_64-linux-gnu/libnss_nis-2.23.so 7f64364e7000-7f64364e8000 rw-p 0000b000 fd:01 58077 /lib/x86_64-linux-gnu/libnss_nis-2.23.so 7f64364e8000-7f64364fe000 r-xp 00000000 fd:01 58079 /lib/x86_64-linux-gnu/libnsl-2.23.so 7f64364fe000-7f64366fd000 ---p 00016000 fd:01 58079 /lib/x86_64-linux-gnu/libnsl-2.23.so 7f64366fd000-7f64366fe000 r--p 00015000 fd:01 58079 /lib/x86_64-linux-gnu/libnsl-2.23.so 7f64366fe000-7f64366ff000 rw-p 00016000 fd:01 58079 /lib/x86_64-linux-gnu/libnsl-2.23.so 7f64366ff000-7f6436701000 rw-p 00000000 00:00 0 7f6436701000-7f6436709000 r-xp 00000000 fd:01 58086 /lib/x86_64-linux-gnu/libnss_compat-2.23.so 7f6436709000-7f6436908000 ---p 00008000 fd:01 58086 /lib/x86_64-linux-gnu/libnss_compat-2.23.so 7f6436908000-7f6436909000 r--p 00007000 fd:01 58086 /lib/x86_64-linux-gnu/libnss_compat-2.23.so 7f6436909000-7f643690a000 rw-p 00008000 fd:01 58086 /lib/x86_64-linux-gnu/libnss_compat-2.23.so 7f643690a000-7f6436935000 r-xp 00000000 fd:01 513344 /usr/lib/jvm/java-8-oracle/jre/lib/amd64/libjava.so 7f6436935000-7f6436b34000 ---p 0002b000 fd:01 513344 /usr/lib/jvm/java-8-oracle/jre/lib/amd64/libjava.so 7f6436b34000-7f6436b36000 rw-p 0002a000 fd:01 513344 /usr/lib/jvm/java-8-oracle/jre/lib/amd64/libjava.so 7f6436b36000-7f6436b43000 r-xp 00000000 fd:01 513295 /usr/lib/jvm/java-8-oracle/jre/lib/amd64/libverify.so 7f6436b43000-7f6436d42000 ---p 0000d000 fd:01 513295 /usr/lib/jvm/java-8-oracle/jre/lib/amd64/libverify.so 7f6436d42000-7f6436d44000 rw-p 0000c000 fd:01 513295 /usr/lib/jvm/java-8-oracle/jre/lib/amd64/libverify.so 7f6436d44000-7f6436d4b000 r-xp 00000000 fd:01 58087 /lib/x86_64-linux-gnu/librt-2.23.so 7f6436d4b000-7f6436f4a000 ---p 00007000 fd:01 58087 /lib/x86_64-linux-gnu/librt-2.23.so 7f6436f4a000-7f6436f4b000 r--p 00006000 fd:01 58087 /lib/x86_64-linux-gnu/librt-2.23.so 7f6436f4b000-7f6436f4c000 rw-p 00007000 fd:01 58087 /lib/x86_64-linux-gnu/librt-2.23.so 7f6436f4c000-7f6437054000 r-xp 00000000 fd:01 58078 /lib/x86_64-linux-gnu/libm-2.23.so 7f6437054000-7f6437253000 ---p 00108000 fd:01 58078 /lib/x86_64-linux-gnu/libm-2.23.so 7f6437253000-7f6437254000 r--p 00107000 fd:01 58078 /lib/x86_64-linux-gnu/libm-2.23.so 7f6437254000-7f6437255000 rw-p 00108000 fd:01 58078 /lib/x86_64-linux-gnu/libm-2.23.so 7f6437255000-7f6437f23000 r-xp 00000000 fd:01 513348 /usr/lib/jvm/java-8-oracle/jre/lib/amd64/server/libjvm.so 7f6437f23000-7f6438123000 ---p 00cce000 fd:01 513348 /usr/lib/jvm/java-8-oracle/jre/lib/amd64/server/libjvm.so 7f6438123000-7f64381fc000 rw-p 00cce000 fd:01 513348 /usr/lib/jvm/java-8-oracle/jre/lib/amd64/server/libjvm.so 7f64381fc000-7f6438247000 rw-p 00000000 00:00 0 7f6438247000-7f6438406000 r-xp 00000000 fd:01 58080 /lib/x86_64-linux-gnu/libc-2.23.so 7f6438406000-7f6438606000 ---p 001bf000 fd:01 58080 /lib/x86_64-linux-gnu/libc-2.23.so 7f6438606000-7f643860a000 r--p 001bf000 fd:01 58080 /lib/x86_64-linux-gnu/libc-2.23.so 7f643860a000-7f643860c000 rw-p 001c3000 fd:01 58080 /lib/x86_64-linux-gnu/libc-2.23.so 7f643860c000-7f6438610000 rw-p 00000000 00:00 0 7f6438610000-7f6438613000 r-xp 00000000 fd:01 58076 /lib/x86_64-linux-gnu/libdl-2.23.so 7f6438613000-7f6438812000 ---p 00003000 fd:01 58076 /lib/x86_64-linux-gnu/libdl-2.23.so 7f6438812000-7f6438813000 r--p 00002000 fd:01 58076 /lib/x86_64-linux-gnu/libdl-2.23.so 7f6438813000-7f6438814000 rw-p 00003000 fd:01 58076 /lib/x86_64-linux-gnu/libdl-2.23.so 7f6438814000-7f6438829000 r-xp 00000000 fd:01 513333 /usr/lib/jvm/java-8-oracle/jre/lib/amd64/jli/libjli.so 7f6438829000-7f6438a29000 ---p 00015000 fd:01 513333 /usr/lib/jvm/java-8-oracle/jre/lib/amd64/jli/libjli.so 7f6438a29000-7f6438a2a000 rw-p 00015000 fd:01 513333 /usr/lib/jvm/java-8-oracle/jre/lib/amd64/jli/libjli.so 7f6438a2a000-7f6438a42000 r-xp 00000000 fd:01 58091 /lib/x86_64-linux-gnu/libpthread-2.23.so 7f6438a42000-7f6438c41000 ---p 00018000 fd:01 58091 /lib/x86_64-linux-gnu/libpthread-2.23.so 7f6438c41000-7f6438c42000 r--p 00017000 fd:01 58091 /lib/x86_64-linux-gnu/libpthread-2.23.so 7f6438c42000-7f6438c43000 rw-p 00018000 fd:01 58091 /lib/x86_64-linux-gnu/libpthread-2.23.so 7f6438c43000-7f6438c47000 rw-p 00000000 00:00 0 7f6438c47000-7f6438c6d000 r-xp 00000000 fd:01 58081 /lib/x86_64-linux-gnu/ld-2.23.so 7f6438d55000-7f6438d5d000 rw-s 00000000 fd:01 263402 /tmp/hsperfdata_root/11305 7f6438d5d000-7f6438d60000 ---p 00000000 00:00 0 7f6438d60000-7f6438e62000 rw-p 00000000 00:00 0 7f6438e68000-7f6438e69000 rw-p 00000000 00:00 0 7f6438e69000-7f6438e6a000 r--p 00000000 00:00 0 7f6438e6a000-7f6438e6c000 rw-p 00000000 00:00 0 7f6438e6c000-7f6438e6d000 r--p 00025000 fd:01 58081 /lib/x86_64-linux-gnu/ld-2.23.so 7f6438e6d000-7f6438e6e000 rw-p 00026000 fd:01 58081 /lib/x86_64-linux-gnu/ld-2.23.so 7f6438e6e000-7f6438e6f000 rw-p 00000000 00:00 0 7ffc2137e000-7ffc2139f000 rw-p 00000000 00:00 0 [stack] 7ffc213a0000-7ffc213a2000 r--p 00000000 00:00 0 [vvar] 7ffc213a2000-7ffc213a4000 r-xp 00000000 00:00 0 [vdso] ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0 [vsyscall] VM Arguments: jvm_args: -Xms7024M -Xmx7024M java_command: spigot.jar java_class_path (initial): spigot.jar Launcher Type: SUN_STANDARD Environment Variables: JAVA_HOME=/usr/lib/jvm/java-8-oracle PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/usr/lib/jvm/java-8-oracle/bin:/usr/lib/jvm/java-8-oracle/db/bin:/usr/lib/jvm/java-8-oracle/jre/bin SHELL=/bin/bash Signal Handlers: SIGSEGV: [libjvm.so+0xac78c0], sa_mask[0]=11111111011111111101111111111110, sa_flags=SA_RESTART|SA_SIGINFO SIGBUS: [libjvm.so+0xac78c0], sa_mask[0]=11111111011111111101111111111110, sa_flags=SA_RESTART|SA_SIGINFO SIGFPE: [libjvm.so+0x920ac0], sa_mask[0]=11111111011111111101111111111110, sa_flags=SA_RESTART|SA_SIGINFO SIGPIPE: [libjvm.so+0x920ac0], sa_mask[0]=11111111011111111101111111111110, sa_flags=SA_RESTART|SA_SIGINFO SIGXFSZ: [libjvm.so+0x920ac0], sa_mask[0]=11111111011111111101111111111110, sa_flags=SA_RESTART|SA_SIGINFO SIGILL: [libjvm.so+0x920ac0], sa_mask[0]=11111111011111111101111111111110, sa_flags=SA_RESTART|SA_SIGINFO SIGUSR1: SIG_DFL, sa_mask[0]=00000000000000000000000000000000, sa_flags=none SIGUSR2: [libjvm.so+0x922300], sa_mask[0]=00100000000000000000000000000000, sa_flags=SA_RESTART|SA_SIGINFO SIGHUP: SIG_DFL, sa_mask[0]=00000000000000000000000000000000, sa_flags=none SIGINT: SIG_DFL, sa_mask[0]=00000000000000000000000000000000, sa_flags=none SIGTERM: SIG_DFL, sa_mask[0]=00000000000000000000000000000000, sa_flags=none SIGQUIT: SIG_DFL, sa_mask[0]=00000000000000000000000000000000, sa_flags=none --------------- S Y S T E M --------------- OS:DISTRIB_ID=Ubuntu DISTRIB_RELEASE=16.04 DISTRIB_CODENAME=xenial DISTRIB_DESCRIPTION="Ubuntu 16.04.2 LTS" uname:Linux 4.4.0-62-generic #83-Ubuntu SMP Wed Jan 18 14:10:15 UTC 2017 x86_64 libc:glibc 2.23 NPTL 2.23 rlimit: STACK 8192k, CORE 0k, NPROC 31103, NOFILE 65536, AS infinity load average:3.97 3.05 2.12 /proc/meminfo: MemTotal: 7980696 kB MemFree: 2236948 kB MemAvailable: 4545916 kB Buffers: 131096 kB Cached: 2359660 kB SwapCached: 0 kB Active: 4309192 kB Inactive: 1195564 kB Active(anon): 3020804 kB Inactive(anon): 35276 kB Active(file): 1288388 kB Inactive(file): 1160288 kB Unevictable: 3656 kB Mlocked: 3656 kB SwapTotal: 0 kB SwapFree: 0 kB Dirty: 404 kB Writeback: 0 kB AnonPages: 3017704 kB Mapped: 93840 kB Shmem: 39664 kB Slab: 187108 kB SReclaimable: 162056 kB SUnreclaim: 25052 kB KernelStack: 4368 kB PageTables: 15300 kB NFS_Unstable: 0 kB Bounce: 0 kB WritebackTmp: 0 kB CommitLimit: 3990348 kB Committed_AS: 11053768 kB VmallocTotal: 34359738367 kB VmallocUsed: 0 kB VmallocChunk: 0 kB HardwareCorrupted: 0 kB AnonHugePages: 2723840 kB CmaTotal: 0 kB CmaFree: 0 kB HugePages_Total: 0 HugePages_Free: 0 HugePages_Rsvd: 0 HugePages_Surp: 0 Hugepagesize: 2048 kB DirectMap4k: 63360 kB DirectMap2M: 4982784 kB DirectMap1G: 3145728 kB CPU:total 2 (1 cores per cpu, 1 threads per core) family 6 model 60 stepping 1, cmov, cx8, fxsr, mmx, sse, sse2, sse3, ssse3, sse4.1, sse4.2, popcnt, avx, avx2, aes, clmul, erms, lzcnt, tsc, bmi1, bmi2 /proc/cpuinfo: processor : 0 vendor_id : GenuineIntel cpu family : 6 model : 60 model name : Intel Core Processor (Haswell, no TSX) stepping : 1 microcode : 0x1 cpu MHz : 2394.454 cache size : 4096 KB physical id : 0 siblings : 1 core id : 0 cpu cores : 1 apicid : 0 initial apicid : 0 fpu : yes fpu_exception : yes cpuid level : 13 wp : yes flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss syscall nx pdpe1gb rdtscp lm constant_tsc rep_good nopl eagerfpu pni pclmulqdq vmx ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lm abm tpr_shadow vnmi flexpriority ept vpid fsgsbase bmi1 avx2 smep bmi2 erms invpcid xsaveopt bugs : bogomips : 4788.90 clflush size : 64 cache_alignment : 64 address sizes : 40 bits physical, 48 bits virtual power management: processor : 1 vendor_id : GenuineIntel cpu family : 6 model : 60 model name : Intel Core Processor (Haswell, no TSX) stepping : 1 microcode : 0x1 cpu MHz : 2394.454 cache size : 4096 KB physical id : 1 siblings : 1 core id : 0 cpu cores : 1 apicid : 1 initial apicid : 1 fpu : yes fpu_exception : yes cpuid level : 13 wp : yes flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss syscall nx pdpe1gb rdtscp lm constant_tsc rep_good nopl eagerfpu pni pclmulqdq vmx ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lm abm tpr_shadow vnmi flexpriority ept vpid fsgsbase bmi1 avx2 smep bmi2 erms invpcid xsaveopt bugs : bogomips : 4788.90 clflush size : 64 cache_alignment : 64 address sizes : 40 bits physical, 48 bits virtual power management: Memory: 4k page, physical 7980696k(2236948k free), swap 0k(0k free) vm_info: Java HotSpot(TM) 64-Bit Server VM (25.121-b13) for linux-amd64 JRE (1.8.0_121-b13), built on Dec 12 2016 16:36:53 by "java_re" with gcc 4.3.0 20080428 (Red Hat 4.3.0-8) time: Fri Apr 21 17:43:38 2017 elapsed time: 0 seconds (0d 0h 0m 0s) Like I am such a Noob to this, so please talk to me in noobish! I run the server on an 64bit Ubuntu 16.04 with 64bit java Plugins list http://prntscr.com/ez6l8p
From the CPU model name, I assume you're running this on a VPS? If so, how much RAM does the VPS have? What's happening here is that the VPS is running out of RAM and Java is crashing.
Some hosts do the ram sharing thing, where if you dont use ram others get it. Maybe you have short spikes that need ram but your host not fast enough to give it?
Try allocating 5GB. If it's still crashing, then it's likely your host is overselling to the point where there simply isn't enough RAM available on the machine.
You should just keep it on half of your max memory, leaving enough space for background services like sshd (OpenSSH) and the network thing (I did ubuntu stuff a few months ago so I forgot its name)
Also you may want to change your garbage collector. (For java 1.9 < the default one is a bad GC mostly suited for client apps with < 256mb memoty usage) (And most likely GC is your problem, from the log you can see that it tries to initialize memory, but can't allocate single big chunk of it)
Wow, thank all of you for the impressive feedback. Do people recommend me to buy an dedicated instead? If yes which one? I got it working with changing it back to the default garbage collector. But I kinda need a new one, don't I? My VPS got this. OpenStack KVM 2 vCores 2.4 GHz 8 GB RAM 40 GB SSD Local RAID 10 It is from OVH.
It's nothing to do with his choice of garbage collector. jvm_args: -Xms7024M -Xmx7024M You are trying to start your server with 7gb of ram, but your server does not have 7gb of ram free. In general -Xms is redundant anyway.
Okay so I'm fine with the standard one? Like, I tested so many Garbage Collectors, and everyone makes it worse, lol. So the server is the problem. But 6 GB ram is fine right now, I am just setting the server up atm. But I got contact with a rather big Youtuber, so the server has to handle 80+ players. What specs would the optimal?