近期发现服务器上的tomcat启动不就就挂掉了。查看错误日志hs_err_xx.log,看到以下日志:
There is insufficient memory for the Java Runtime Environment to continue.
Native memory allocation (malloc) failed to allocate 354496 bytes for Chunk::new
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 (allocation.cpp:390), pid=7980, tid=0x0000000000001b00
JRE version: Java™ SE Runtime Environment (8.0_92-b14) (build 1.8.0_92-b14)
Java VM: Java HotSpot™ 64-Bit Server VM (25.92-b14 mixed mode windows-amd64 compressed oops)
Failed to write core dump. Call to MiniDumpWriteDump() failed (Error 0x800705af: 页面文件太小,无法完成操作。
)
—很明显发现是服务器配置的内存不对造成的。发现是界面内存不足造成的,解决方法是调整服务器的界面内存设置。具体配置方式就不详述。