即使有足够的 RAM 可用,Java 程序也无法分配本机内存。程序因 os_commit 异常而失败后反复崩溃。任何更新以调整 Java Heap 等的建议。## There is insufficient memory for the Java Runtime Environment to continue.# Native memory allocation (mmap) failed to map 12288 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=35462, tid=140393234093824## JRE version: Java(TM) SE Runtime Environment (8.0_65-b17) (build 1.8.0_65-b17)# Java VM: Java HotSpot(TM) 64-Bit Server VM (25.65-b01 mixed mode linux-amd64 compressed oops)# Core dump written. Default location: /usr/hdp/share/hst/activity-analyzer/core or core.35462#根据日志,您可以看到有足够的可用内存Memory: 4k page, physical 264266920k(135968600k free), swap 8393468k(8393468k free)vm_info: Java HotSpot(TM) 64-Bit Server VM (25.65-b01) for linux-amd64 JRE (1.8.0_65-b17), built on Oct 6 2015 17:16:12 by "java_re" with gcc 4.3.0 20080428 (Red Hat 4.3.0-8)time: Tue Feb 5 05:54:26 2019elapsed time: 2928 seconds (0d 0h 48m 48s)资源利用率# free -mg total used free shared buffers cachedMem: 252 134 117 0 0 25-/+ buffers/cache: 108 143Swap: 8 0 8JMap 输出# jmap -heap 2820Attaching to process ID 2820, please wait...Debugger attached successfully.Server compiler detected.JVM version is 25.65-b01using thread-local object allocation.Parallel GC with 33 thread(s)
添加回答
举报
0/150
提交
取消