我在不断的部署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自动分配
在部署Tomcat过程中遇到OOM异常,系统提示内存不足。可能原因包括物理RAM或交换空间不足,32位模式下进程大小限制达到上限。解决方案涉及减少系统内存负载,增加物理内存或交换空间,使用64位Java和操作系统,调整JVM堆大小,减少Java线程数等。
7967

被折叠的 条评论
为什么被折叠?



