64位windows操作系统下尽量不要使用32位JDK

在64位Windows操作系统中,使用32位JDK可能导致应用程序服务器频繁崩溃。错误日志显示内存不足,但实际内存使用远未达到极限。尝试增加-Xmx内存大小无效,问题在StackOverflow讨论中提出,部分解决方案包括减少-Xmx设置和使用64位JDK。降低JVM堆大小后,问题暂时解决,但默认参数可能不适用于生产环境,建议在64位系统上使用64位JDK以优化性能。
摘要由CSDN通过智能技术生成

新产品发布,拿来试用。由于本机是win7_x64,但是为方便工作,机器安装了从32位的JDK1.5一直到64位的JDK1.6的4个JDK。为保证运行时能与大多数人的运行状况相同,依然采用了32位的jdk1.6来运行产品。

结果,我第一次碰到应用服务器刚起来就crash的问题。

生成的JVM的错误日志如下:

#
# There is insufficient memory for the Java Runtime Environment to continue.
# Native memory allocation (malloc) failed to allocate 678096 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:317), pid=2468, tid=2708
#
# JRE version: 6.0_31-b05
# Java VM: Java HotSpot(TM) Server VM (20.6-b01 mixed mode windows-x86 )

---------------  T H R E A D  ---------------

Current thread (0x05f65c00):  JavaThread "C2 CompilerThread1" daemon [_thread_in_native, id=2708, stack(0x06320000,0x06370000)]

Stack: [0x06320000,0x06370000],  sp=0x0636e594,  free space=313k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)

[error occurred during error reporting (printing native stack), id 0xc0000005]


Current CompileTask:
C2:  66818 1186      com.sun.corba.se.impl.corba.TypeCodeImpl.read_value_body(Lorg/omg/CORBA_2_3/portable/InputStream;)V (1274 bytes)


---------------  P R O C E S S  ---------------

Java Threads: ( => current thread )
  0x08447000 JavaThread "Idle HTTPHandler-4" [_thread_blocked, id=7344, stack(0x0e320000,0x0e370000)]
  0x08446800 JavaThread "Idle HTTPHandler-3" [_thread_blocked, id=4148, stack(0x0e290000,0x0e2e0000)]
  0x08446000 JavaThread "Idle HTTPHandler-2" [_thread_blocked, id=5736, stack(0x0e200000,0x0e250000)]
  0x08445c00 JavaThread "Idle ORBWorker-3" [_thread_blocked, id=6876, stack(0x0c460000,0x0c4b0000)]
  0x08445400 JavaThread "Running ORBWorker-2" [_thread_in_vm, id=6612, stack(0x0c330000,0x0c380000)]
  0x08445000 JavaThread "AS-Monitor Sampling Thread: ThreadMonitor" [_thread_blocked, id=7820, stack(0x0c290000,0x0c2e0000)]
  0x08444800 JavaThread "AS-Monitor Sampling Thread: HttpConnectionMonitor" [_thread_blocked, id=7688, stack(0x0c200000,0x0c250000)]
  0x06fb3c00 JavaThread "AS-Monitor Sampling Thread: DataSourcesMonitor" [_thread_blocked, id=1448, stack(0x0c170000,0x0c1c0000)]
  0x07ffac00 JavaThread "AS-Monitor Sampling Thread: SessionsMonitor" [_thread_blocked, id=6160, stack(0x0c0e0000,0x0c130000)]
  0x07ffa400 JavaThread "AS-Monitor Sampling Thread: JTAMonitor" [_thread_blocked, id=6844, stack(0x0c050000,0x0c0a0000)]
  0x07ffa000 JavaThread "AS-Monitor Sampling Thread: ClassLoadMonitor" [_thread_blocked, id=7148, stack(0x0bfc0000,0x0c010000)]
  0x07ff9800 JavaThread "AS-Monitor Sampling Thread: MemoryMonitor" [_thread_blocked, id=7428, stack(0x0bf30000,0x0bf80000)]
  0x07ff9000 JavaThread "p: default-threadpool; w: Idle" daemon [_thread_blocked, id=4840, stack(0x0b4e0000,0x0b530000)]
  0x07ff8c00 JavaThread "p: default-threadpool; w: Idle" daemon [_thread_blocked, id=6512, stack(0x0b440000,0x0b490000)]
  0x07ff8400 JavaThread "Thread-19" daemon [_thread_blocked, id=7412, stack(0x0b230000,0x0b280000)]
  0x07ff8000 JavaThread "JMX server connection timeout 64" daemon [_thread_blocked, id=2176, stack(0x0b180000,0x0b1d0000)]
  0x07ff7800 JavaThread "p: default-threadpool; w: Idle" daemon [_thread_blocked, id=7128, stack(0x0b0
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值