我在不断的部署tomca t 时候,出现了oom 异常,见如下截图:
#
# There is insufficient memory for the Java Runtime Environment to continue.
# Native memory allocation (malloc) failed to allocate 644816 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=122548, tid=0x00000000000182ec
#
# JRE version: Java(TM) SE Runtime Environment (8.0_191-b12) (build 1.8.0_191-b12)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (25.191-b12 mixed mode windows-amd64 compressed oops)
# Failed to write core dump. Minidumps are not enabled by default on client versions of Windows
#
--------------- T H R E A D ---------------
JvmtiExport can_access_local_variables 0
JvmtiExport can_hotswap_or_post_breakpoint 0
JvmtiExport can_post_on_exceptions 0
# 283 ciObject found
ciMethod java/lang/Object <init> ()V 4097 1 1532866 0 0
ciMethod java/lang/String <init> ([CII)V 2049 1 5628 0 736
ciMethod java/lang/String length ()I 4097 1 799417 0 64
ciMethod java/lang/String charAt (I)C 4097 1 1324612 0 -1
ciMethod java/lang/String getChars (II[CI)V 2169 1 5443 0 320
原因分析:
1.设置JVM 内存参数都不行
2.重启机器,让JVM自动分配