Oracle Glassfish Server Crashes With "java.lang.OutOfMemoryError: unable to create new native thread"
(Doc ID 1502850.1)
Last updated on OCTOBER 02, 2024
Applies to:
Oracle GlassFish Server - Version 2.1 and laterInformation in this document applies to any platform.
Symptoms
Oracle GlassFish Server crashes with "java.lang.OutOfMemoryError: unable to create new native thread" in the server.log
[#2012-10-2316:22:14.904-0400|SEVERE|oracle-glassfish3.1.1|javax.enterprise.system.std.com.sun.enterprise.server.logging|_ThreadID=<ID>;_ThreadName=<Name>;|java.lang.OutOfMemoryError: unable to create new native thread
at java.lang.Thread.start0(Native Method)
at java.lang.Thread.start(Thread.java:640)
at java.lang.UNIXProcess$2.run(UNIXProcess.java:95)
at java.security.AccessController.doPrivileged(Native Method)
at java.lang.UNIXProcess.(UNIXProcess.java:81)
at java.lang.ProcessImpl.start(ProcessImpl.java:65)
at java.lang.ProcessBuilder.start(ProcessBuilder.java:453)
at java.lang.Runtime.exec(Runtime.java:593)
at java.lang.Runtime.exec(Runtime.java:431)
at CGIServlet_5_5_9.CGIServlet$CGIRunner.run(CGIServlet.java:1756)
at CGIServlet_5_5_9.CGIServlet.doGet(CGIServlet.java:619)
at CGIServlet_5_5_9.CGIServlet.doPost(CGIServlet.java:581)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:754)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1539)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:343)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:217)
at org.xxxxx.common.web.UserGateway.CgiFilter.doFilter(Unknown Source)
The crash also generates an hs_err log in the config directory. The hs_err log shows the following information:
# There is insufficient memory for the Java Runtime Environment to continue.
# Native memory allocation (malloc) failed to allocate 32756 bytes for ChunkPool::allocate
# 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:211), pid=<PID>, tid=<TID>
#
# JRE version: 6.0_27-b07
# Java VM: Java HotSpot(TM) Server VM (20.2-b06 mixed mode solaris-sparc )
Cause
To view full details, sign in with your My Oracle Support account. |
|
Don't have a My Oracle Support account? Click to get started! |
In this Document
Symptoms |
Cause |
Solution |
References |