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

时间:2012-10-08 06:39:34

标签: java jboss jvm

我的操作系统版本是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个包装器应用程序。每个都设置为最大JVM堆大小700Mb。

请帮我看看这个问题。谢谢。我的问题是:

  1. 如何知道当前JVM分配的大小?
  2. 这个问题的原因是什么?
  3. 如何解决?有人建议我使用64位JDK。有必要吗?

2 个答案:

答案 0 :(得分:2)

如果使用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。

  1. 下载JDK 64 bit version

  2. 将JAVA_OPTS设置为

     JAVA_OPTS=-Xms1024m -Xmx1024m -XX:MaxPermSize=256m 
    
  3. 并参考此link

    这也是关于memory的好文章。

答案 1 :(得分:1)

32位JVM限制为最大2GB堆(-Xmx)。在某些操作系统中,远不止于此。

64位JVM不会有此限制。

在Windows中,您可以使用JVM的内存消耗 任务管理器 - >流程。

相关问题