Do not use 32-bit JDK in 64-bit windows

Source: Internet
Author: User
Tags ssh secure shell xms

Release a new product and try it out. The local machine is win7_x64, but for the convenience of work, the machine has installed four JDK from 32-bit jdk1.5 to 64-bit jdk1.6. To ensure that the running status of most people is the same, the 32-bit jdk1.6 is still used to run the product.

As a result, I first encountered a crash problem when the application server got up.

The generated JVM error log is as follows:


#
# 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(0x0b010000,0x0b060000)]
  0x07ff7400 JavaThread "Idle ORBWorker-1" [_thread_blocked, id=7976, stack(0x0af60000,0x0afb0000)]
  0x06fb4800 JavaThread "SelectorThread" daemon [_thread_in_native, id=3124, stack(0x0aec0000,0x0af10000)]
  0x06fb4000 JavaThread "SelectorThread" daemon [_thread_in_native, id=2704, stack(0x0ae10000,0x0ae60000)]
  0x06fb3400 JavaThread "pool-2-thread-1" [_thread_blocked, id=8036, stack(0x0a910000,0x0a960000)]
  0x06fb2c00 JavaThread "Idle HTTPHandler-1" [_thread_blocked, id=6600, stack(0x0a7d0000,0x0a820000)]
  0x06fb2800 JavaThread "HttpReader" [_thread_in_native, id=5532, stack(0x0a740000,0x0a790000)]
  0x06fb2000 JavaThread "MuxReader" [_thread_in_native, id=6712, stack(0x0a6b0000,0x0a700000)]
  0x06fb1c00 JavaThread "AutoDeployer" [_thread_blocked, id=6732, stack(0x0a1d0000,0x0a220000)]
  0x06fb1400 JavaThread "MongoCleaner22152612" daemon [_thread_blocked, id=4764, stack(0x0a140000,0x0a190000)]
  0x06fb1000 JavaThread "derby.rawStoreDaemon" daemon [_thread_blocked, id=8008, stack(0x0a0a0000,0x0a0f0000)]
  0x06cfc000 JavaThread "Timer-2" daemon [_thread_blocked, id=6484, stack(0x09fe0000,0x0a030000)]
  0x06cf8000 JavaThread "derby.antiGC" daemon [_thread_blocked, id=3232, stack(0x08fd0000,0x09020000)]
  0x06cfb800 JavaThread "RMI TCP Connection(idle)" daemon [_thread_blocked, id=2936, stack(0x09ba0000,0x09bf0000)]
  0x06cfb400 JavaThread "RMI TCP Connection(4)-192.168.0.70" daemon [_thread_blocked, id=7516, stack(0x095f0000,0x09640000)]
  0x06cfac00 JavaThread "RMI TCP Connection(idle)" daemon [_thread_blocked, id=5808, stack(0x094d0000,0x09520000)]
  0x06cfa800 JavaThread "RMI TCP Connection(2)-192.168.0.70" daemon [_thread_in_native, id=5784, stack(0x09430000,0x09480000)]
  0x06cfa000 JavaThread "JMX server connection timeout 41" daemon [_thread_blocked, id=6264, stack(0x09320000,0x09370000)]
  0x06cf9c00 JavaThread "RMI Scheduler(0)" daemon [_thread_blocked, id=8124, stack(0x09290000,0x092e0000)]
  0x06cf9400 JavaThread "RMI TCP Connection(1)-192.168.0.70" daemon [_thread_in_native, id=8160, stack(0x09200000,0x09250000)]
  0x06cf8800 JavaThread "RMI TCP Accept-0" daemon [_thread_in_native, id=6096, stack(0x091b0000,0x09200000)]
  0x06cf7c00 JavaThread "derby.rawStoreDaemon" daemon [_thread_blocked, id=1388, stack(0x08f40000,0x08f90000)]
  0x06cf7400 JavaThread "Timer-1" daemon [_thread_blocked, id=3912, stack(0x08eb0000,0x08f00000)]
  0x06cf7000 JavaThread "derby.antiGC" daemon [_thread_blocked, id=6244, stack(0x08e20000,0x08e70000)]
  0x06cf6000 JavaThread "Idle JMSHandler-4" [_thread_blocked, id=6420, stack(0x07dc0000,0x07e10000)]
  0x06cf5c00 JavaThread "Idle JMSHandler-3" [_thread_blocked, id=7960, stack(0x07d30000,0x07d80000)]
  0x06cf5400 JavaThread "Idle JMSHandler-2" [_thread_blocked, id=2436, stack(0x07ca0000,0x07cf0000)]
  0x06cf5000 JavaThread "pool-1-thread-5" [_thread_blocked, id=5680, stack(0x07c10000,0x07c60000)]
  0x06cf4800 JavaThread "JMSReader" [_thread_in_native, id=5280, stack(0x07b80000,0x07bd0000)]
  0x06d50000 JavaThread "pool-1-thread-4" [_thread_blocked, id=5472, stack(0x07af0000,0x07b40000)]
  0x06c2bc00 JavaThread "Timer-0" [_thread_blocked, id=5444, stack(0x07a60000,0x07ab0000)]
  0x06c2b800 JavaThread "pool-1-thread-3" [_thread_blocked, id=5296, stack(0x079d0000,0x07a20000)]
  0x06c2b000 JavaThread "Running JMSHandler-1" [_thread_blocked, id=7408, stack(0x07940000,0x07990000)]
  0x06c2ac00 JavaThread "HTTPSessionSwapper" [_thread_blocked, id=6828, stack(0x078b0000,0x07900000)]
  0x06c77c00 JavaThread "pool-1-thread-2" [_thread_blocked, id=3896, stack(0x07820000,0x07870000)]
  0x07271800 JavaThread "Thread-3" [_thread_blocked, id=3180, stack(0x07790000,0x077e0000)]
  0x06d2c400 JavaThread "MuxSecureListener" [_thread_in_native, id=7824, stack(0x076b0000,0x07700000)]
  0x06ca2800 JavaThread "MuxListener" [_thread_in_native, id=8040, stack(0x068d0000,0x06920000)]
  0x06bf5800 JavaThread "pool-1-thread-1" [_thread_blocked, id=6192, stack(0x06840000,0x06890000)]
  0x06bf5400 JavaThread "LogManager" [_thread_blocked, id=1048, stack(0x06740000,0x06790000)]
  0x05f69400 JavaThread "Low Memory Detector" daemon [_thread_blocked, id=6396, stack(0x063b0000,0x06400000)]
=>0x05f65c00 JavaThread "C2 CompilerThread1" daemon [_thread_in_native, id=2708, stack(0x06320000,0x06370000)]
  0x05f3d400 JavaThread "C2 CompilerThread0" daemon [_thread_blocked, id=4736, stack(0x06290000,0x062e0000)]
  0x05f3ac00 JavaThread "Attach Listener" daemon [_thread_blocked, id=8056, stack(0x06200000,0x06250000)]
  0x05f32000 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=6720, stack(0x06170000,0x061c0000)]
  0x027d2c00 JavaThread "Finalizer" daemon [_thread_blocked, id=2296, stack(0x05ee0000,0x05f30000)]
  0x027d1800 JavaThread "Reference Handler" daemon [_thread_blocked, id=4972, stack(0x05e50000,0x05ea0000)]
  0x004db800 JavaThread "main" [_thread_blocked, id=716, stack(0x00430000,0x00480000)]

Other Threads:
  0x027ce800 VMThread [stack: 0x05dc0000,0x05e10000] [id=5688]
  0x05f72400 WatcherThread [stack: 0x06440000,0x06490000] [id=7564]

VM state:not at safepoint (normal execution)

VM Mutex/Monitor currently owned by a thread: None

Heap
 PSYoungGen      total 305856K, used 108523K [0x49ac0000, 0x5f010000, 0x5f010000)
  eden space 262208K, 38% used [0x49ac0000,0x4fd23988,0x59ad0000)
  from space 43648K, 17% used [0x5c570000,0x5cd075d8,0x5f010000)
  to   space 43648K, 0% used [0x59ad0000,0x59ad0000,0x5c570000)
 PSOldGen        total 699072K, used 11615K [0x1f010000, 0x49ac0000, 0x49ac0000)
  object space 699072K, 1% used [0x1f010000,0x1fb67c70,0x49ac0000)
 PSPermGen       total 78336K, used 58337K [0x0f010000, 0x13c90000, 0x1f010000)
  object space 78336K, 74% used [0x0f010000,0x12908470,0x13c90000)

Code Cache  [0x027e0000, 0x02b20000, 0x057e0000)
 total_blobs=1388 nmethods=1153 adapters=188 free_code_cache=47006656 largest_free_block=29760

Dynamic libraries:
0x00400000 - 0x00425000 	D:\Java\x86\jdk1.6.0_31\bin\java.exe
0x77cf0000 - 0x77e70000 	C:\Windows\SysWOW64\ntdll.dll
0x74fb0000 - 0x750c0000 	C:\Windows\syswow64\kernel32.dll
0x750c0000 - 0x75106000 	C:\Windows\syswow64\KERNELBASE.dll
0x75200000 - 0x752a0000 	C:\Windows\syswow64\ADVAPI32.dll
0x76b60000 - 0x76c0c000 	C:\Windows\syswow64\msvcrt.dll
0x75690000 - 0x756a9000 	C:\Windows\SysWOW64\sechost.dll
0x77200000 - 0x772f0000 	C:\Windows\syswow64\RPCRT4.dll
0x74f40000 - 0x74fa0000 	C:\Windows\syswow64\SspiCli.dll
0x74f30000 - 0x74f3c000 	C:\Windows\syswow64\CRYPTBASE.dll
0x7c340000 - 0x7c396000 	D:\Java\x86\jdk1.6.0_31\jre\bin\msvcr71.dll
0x6db90000 - 0x6dfe8000 	D:\Java\x86\jdk1.6.0_31\jre\bin\server\jvm.dll
0x766d0000 - 0x767d0000 	C:\Windows\syswow64\USER32.dll
0x752a0000 - 0x75330000 	C:\Windows\syswow64\GDI32.dll
0x75680000 - 0x7568a000 	C:\Windows\syswow64\LPK.dll
0x76d10000 - 0x76dad000 	C:\Windows\syswow64\USP10.dll
0x767d0000 - 0x76802000 	C:\Windows\syswow64\WINMM.dll
0x76ca0000 - 0x76d00000 	C:\Windows\system32\IMM32.DLL
0x755b0000 - 0x7567c000 	C:\Windows\syswow64\MSCTF.dll
0x71ad0000 - 0x71b1c000 	C:\Windows\system32\apphelp.dll
0x72f80000 - 0x72fb2000 	C:\Windows\SysWOW64\nvinit.dll
0x0f000000 - 0x0f006000 	C:\Program Files (x86)\NVIDIA Corporation\CoProcManager\_etoured.dll
0x71a90000 - 0x71acc000 	C:\Program Files (x86)\NVIDIA Corporation\CoProcManager\nvd3d9wrap.dll
0x75710000 - 0x758ad000 	C:\Windows\syswow64\SETUPAPI.dll
0x75330000 - 0x75357000 	C:\Windows\syswow64\CFGMGR32.dll
0x758b0000 - 0x7593f000 	C:\Windows\syswow64\OLEAUT32.dll
0x76db0000 - 0x76f0c000 	C:\Windows\syswow64\ole32.dll
0x76840000 - 0x76852000 	C:\Windows\syswow64\DEVOBJ.dll
0x71a50000 - 0x71a8b000 	C:\Program Files (x86)\NVIDIA Corporation\CoProcManager\nvdxgiwrap.dll
0x6d870000 - 0x6d87c000 	D:\Java\x86\jdk1.6.0_31\jre\bin\verify.dll
0x6d3d0000 - 0x6d3ef000 	D:\Java\x86\jdk1.6.0_31\jre\bin\java.dll
0x6d8b0000 - 0x6d8bf000 	D:\Java\x86\jdk1.6.0_31\jre\bin\zip.dll
0x6d6b0000 - 0x6d6c3000 	D:\Java\x86\jdk1.6.0_31\jre\bin\net.dll
0x76c10000 - 0x76c45000 	C:\Windows\syswow64\WS2_32.dll
0x75490000 - 0x75496000 	C:\Windows\syswow64\NSI.dll
0x722c0000 - 0x722fc000 	C:\Windows\system32\mswsock.dll
0x713f0000 - 0x713f6000 	C:\Windows\System32\wship6.dll
0x72510000 - 0x72520000 	C:\Windows\system32\NLAapi.dll
0x72500000 - 0x72510000 	C:\Windows\system32\napinsp.dll
0x72420000 - 0x72432000 	C:\Windows\system32\pnrpnsp.dll
0x72270000 - 0x722b4000 	C:\Windows\system32\DNSAPI.dll
0x724f0000 - 0x724f8000 	C:\Windows\System32\winrnr.dll
0x003e0000 - 0x003f7000 	C:\Program Files (x86)\Common Files\Thunder Network\NetMon\net_monitor2.0.2.7.dll
0x75a80000 - 0x766ca000 	C:\Windows\syswow64\SHELL32.dll
0x756b0000 - 0x75707000 	C:\Windows\syswow64\SHLWAPI.dll
0x7c3c0000 - 0x7c43c000 	C:\Windows\system32\MSVCP71.dll
0x73680000 - 0x73689000 	C:\Windows\system32\VERSION.dll
0x73640000 - 0x7364b000 	C:\Windows\system32\profapi.dll
0x71bb0000 - 0x71bb5000 	C:\Windows\System32\wshtcpip.dll
0x73620000 - 0x7363c000 	C:\Windows\system32\IPHLPAPI.DLL
0x73610000 - 0x73617000 	C:\Windows\system32\WINNSI.DLL
0x71400000 - 0x71406000 	C:\Windows\system32\rasadhlp.dll
0x71420000 - 0x71458000 	C:\Windows\System32\fwpuclnt.dll
0x6d600000 - 0x6d609000 	D:\Java\x86\jdk1.6.0_31\jre\bin\management.dll
0x6d6d0000 - 0x6d6d9000 	D:\Java\x86\jdk1.6.0_31\jre\bin\nio.dll
0x6d850000 - 0x6d858000 	D:\Java\x86\jdk1.6.0_31\jre\bin\sunmscapi.dll
0x75370000 - 0x7548e000 	C:\Windows\syswow64\CRYPT32.dll
0x74fa0000 - 0x74fac000 	C:\Windows\syswow64\MSASN1.dll
0x72f00000 - 0x72f16000 	C:\Windows\system32\CRYPTSP.dll
0x72ec0000 - 0x72efb000 	C:\Windows\system32\rsaenh.dll
0x73650000 - 0x73667000 	C:\Windows\system32\USERENV.dll
0x6d370000 - 0x6d38a000 	D:\Java\x86\jdk1.6.0_31\jre\bin\instrument.dll
0x724e0000 - 0x724ed000 	C:\Windows\system32\dhcpcsvc6.DLL
0x72540000 - 0x72552000 	C:\Windows\system32\dhcpcsvc.DLL
0x6d7a0000 - 0x6d7a6000 	D:\Java\x86\jdk1.6.0_31\jre\bin\rmi.dll
0x76d00000 - 0x76d05000 	C:\Windows\system32\PSAPI.DLL
0x6d0b0000 - 0x6d1fc000 	D:\Java\x86\jdk1.6.0_31\jre\bin\awt.dll
0x72c60000 - 0x72cb1000 	C:\Windows\system32\WINSPOOL.DRV
0x73190000 - 0x7332e000 	C:\Windows\WinSxS\x86_microsoft.windows.common-controls_6595b64144ccf1df_6.0.7601.17514_none_41e6975e2bd6f2b2\COMCTL32.dll

VM Arguments:
jvm_args: -Dcom.apusic.domain.home=D:\AAS8.0\AAS\domains\mydomain -Xms1024m -Xmx1024m -XX:MaxPermSize=256m 
java_command: com.apusic.server.Main -root D:\AAS8.0\AAS
Launcher Type: SUN_STANDARD

Environment Variables:
JAVA_HOME=D:\Java\x86\jdk1.6.0_31
CLASSPATH=D:\AAS8.0\AAS\classes;D:\AAS8.0\AAS\common\javaee.jar;D:\AAS8.0\AAS\common\jsf-api.jar;D:\AAS8.0\AAS\lib\apusic-client.jar;D:\AAS8.0\AAS\lib\apusic-jms.jar;D:\AAS8.0\AAS\lib\apusic-ws.jar;D:\AAS8.0\AAS\lib\apusic.jar;D:\AAS8.0\AAS\lib\bean-validator.jar;D:\AAS8.0\AAS\lib\deploy.jar;D:\AAS8.0\AAS\lib\elite-api.jar;D:\AAS8.0\AAS\lib\elite.jar;D:\AAS8.0\AAS\lib\firststep.jar;D:\AAS8.0\AAS\lib\jasper-jdt.jar;D:\AAS8.0\AAS\lib\mejb.jar;D:\AAS8.0\AAS\lib\operamasks-impl.jar;D:\AAS8.0\AAS\lib\razor.jar;D:\AAS8.0\AAS\lib\ext\activation.jar;D:\AAS8.0\AAS\lib\ext\bcprov-jdk15-138.jar;D:\AAS8.0\AAS\lib\ext\dsn.jar;D:\AAS8.0\AAS\lib\ext\eclipselink.jar;D:\AAS8.0\AAS\lib\ext\jaxb-impl.jar;D:\AAS8.0\AAS\lib\ext\jaxb-xjc.jar;D:\AAS8.0\AAS\lib\ext\jgroups-all.jar;D:\AAS8.0\AAS\lib\ext\jhall.jar;D:\AAS8.0\AAS\lib\ext\jmxremote.jar;D:\AAS8.0\AAS\lib\ext\jmxremote_optional.jar;D:\AAS8.0\AAS\lib\ext\ldapjdk.jar;D:\AAS8.0\AAS\lib\ext\ldapsp.jar;D:\AAS8.0\AAS\lib\ext\mail.jar;D:\AAS8.0\AAS\lib\ext\operamasks-third-party.jar;D:\AAS8.0\AAS\lib\ext\standard.jar;D:\AAS8.0\AAS\lib\ext\toplink-essentials-agent.jar;D:\AAS8.0\AAS\lib\ext\toplink-essentials.jar;D:\AAS8.0\AAS\lib\ext\xmemcached.jar;.;D:\Java\x86\jdk1.6.0_31\lib\tools.jar;D:\Java\x86\jdk1.6.0_31\lib\dt.jar
PATH=D:\AAS8.0\AAS\bin;D:\Java\x86\jdk1.6.0_31\bin;D:\Java\x86\jdk1.6.0_31\bin;C:\Program Files (x86)\Common Files\NetSarang;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Lenovo\Access Connections\;D:\MySQL\MySQL Server 5.5\bin;C:\Program Files (x86)\Common Files\Roxio Shared\DLLShared\;D:\Program Files (x86)\QuickTime\QTSystem\;d:\SSH Communications Security\SSH Secure Shell
USERNAME=mortimer
OS=Windows_NT
PROCESSOR_IDENTIFIER=Intel64 Family 6 Model 42 Stepping 7, GenuineIntel



---------------  S Y S T E M  ---------------

OS: Windows 7 , 64 bit Build 7601 Service Pack 1

CPU:total 4 (2 cores per cpu, 2 threads per core) family 6 model 42 stepping 7, cmov, cx8, fxsr, mmx, sse, sse2, sse3, ssse3, sse4.1, sse4.2, popcnt, ht

Memory: 4k page, physical 8273136k(4724820k free), swap 16544420k(12014064k free)

vm_info: Java HotSpot(TM) Server VM (20.6-b01) for windows-x86 JRE (1.6.0_31-b05), built on Feb  3 2012 18:35:56 by "java_re" with MS VC++ 7.1 (VS2003)

time: Mon Aug 27 15:11:04 2012
elapsed time: 66 seconds

After a problem occurs, start the as again, use jconsole monitoring, and add the OS Resource Manager to view it. Everything looks very normal. From the error log alone, the JVM carsh is caused by insufficient memory.

Startup parameters:-server-xms1024m-xmx1024m-XX: maxpermsize = 128 m


However, the local machine has 8 GB memory. When running this application, it only uses less than 3 GB memory. Try to use-xmx to increase the memory and try to increase it to 1600 mb. However, it cannot be started, the final position is 1200 m, but the as will still crash after running for a period of time.
Next, there are various Google versions. Some people say this is a jdk1.6 bug, but the minor version number is 25 (or even some people who call it an e-commerce company, we suggest rolling back to update24). I am 31, has this bug been disabled? There is a post on this issue in stackoverflow (http://stackoverflow.com/questions/6344546/java-6-update-25-vm-crash-insufficient-memory), the problem is the same as mine, and the adoption of various approaches seems to be the final solution.

The landlord added-XX:-DoEscapeAnalysisBut I still cannot. This parameter does not seem to be capable of overflow analysis. I just delayed the crash time a little and the problem remains unsolved.

Check the post of this post to reduce the size of-xmx, and in the JVM crash log, we also mention reducing the size of-xmx/XMS, so we try to reduce the size, remove all JVM parameters at as startup and use the default value. The problem has been solved (however, according to official instructions, the default size of-xmx should be 1/4 of the physical memory, which is 2 GB for me, this value is larger than the parameter I set, but the problem occurs after it is specified). Currently, as is running for half an hour and still has no problem (it starts with automatic crash within 1 minute ). However, in the actual production environment, the default JVM parameters often cannot meet the requirements. Therefore, a problem occurs: Since the operating system has been installed with 64-bit, in addition, JDK has a 64-bit version. in the production environment, try to install and use a 64-bit JDK on a 64-bit OS to maximize the performance.

For more information about how to reduce the JVM heap size, see the following:


Every thread in the JVM thread stack application needs memory to store the stack (the memory area used to hold local variables and maintain the state when calling the function ). Each Java thread needs a stack space to run. Depending on the implementation, Java threads can be divided into local threads and Java stacks. In addition to the stack space, each thread also needs to provide some local memory for the Thread Local Storage and internal data structure. JVM stack size-XSS 128 K: Set the stack size of each thread. After jdk5.0, the stack size of each thread is 1 MB, and the previous stack size of each thread is 256 K. Adjust the memory size required by the application thread. Reduce this value to generate more threads in the same physical memory. However, the operating system still has a limit on the number of threads in a process. It cannot be generated infinitely. The experience is between 3000 and ~ About 5000. The relationship and balance between JVM heap, JVM private memory, and JVM thread stack size. The size of the thread stack is a double-edged sword. If it is set too small, Stack Overflow may occur, especially when there is a recursive and large loop in the thread, which is more likely to overflow, if this value is set too large, it will affect the number of stacks created. If it is a multi-threaded application, a memory overflow error will occur.

Another article titled solving this problem.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.