gpt4 book ai didi

java - 为什么我的 JBoss 包装器应用程序 JVM 会重新启动?

转载 作者:行者123 更新时间:2023-12-04 05:29:44 25 4
gpt4 key购买 nike

我的操作系统版本是 Windows 7 64 位,JDK 是 32 位版本。我成功启动了我的 JBoss Wrapper 应用程序,但在它运行一段时间后,JVM 失败并重新启动。

JVM 转储日志中的消息是:

#
# There is insufficient memory for the Java Runtime Environment to continue.
# Native memory allocation (malloc) failed to allocate 543672 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:328), pid=5480, tid=4740
#
# JRE version: 7.0_05-b05
# Java VM: Java HotSpot(TM) Server VM (23.1-b03 mixed mode windows-x86 )
# Failed to write core dump. Minidumps are not enabled by default on client versions of Windows
#

我在我的计算机上部署了 3 个包装应用程序。它们中的每一个都设置为 700Mb 的最大 JVM 堆大小。

请帮我检查这个问题。谢谢。我的问题是:
  • 如何知道当前 JVM 分配的大小?
  • 这个问题的原因是什么?
  • 如何解决?有人推荐我使用 64 位 JDK。有必要吗?
  • 最佳答案

    如果您使用 32-bit JDK ,我们可以设置的最大堆大小仍然有 JVM start up is about 1.2 GB.For larger heaps, we need to run a 64-bit JDK. To run 64-bit JDK, you’d also need a 64 位 operating system running on a server that has a 64 位 CPU。

  • 已下载 JDK 64 bit version
  • 将 JAVA_OPTS 设置为
     JAVA_OPTS=-Xms1024m -Xmx1024m -XX:MaxPermSize=256m 

  • 并引用此 link .

    这也是关于 memory 的好文章.

    关于java - 为什么我的 JBoss 包装器应用程序 JVM 会重新启动?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12776507/

    25 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com