How do I fix a java.lang.OutOfMemoryError: unable to create new native thread?

3
Hello people, After my application crashed on production environment.I got an error message in command prompt #An unexpected error has been detected by Java Runtime Environment: # #java.lang.OutOfMemoryError: requested 1024000 bytes for GrET in C:\BUILDAREA\jdk613\hotspot\src\share\vm\utilities\growableArray.cpp. Out of swap space? # #Internal Error (allocation.inline.hpp:42), pid=2680, tid=2692 #Error: GrET in C:\BUILDAREA\jdk613\hotspot\src\share\vm\utilities\growableArray.cpp # #Java VM: Java HotSpot(TM) Client VM (11.3-b02 mixed mode windows-x86) #If you would like to submit a bug report, please visit: #http://java.sun.com/webapps/bugreport/crash.jsp I also got a file in the same location of application.conf.It's name is hserrpid6056.log VM Arguments: jvmargs: -Xms256M -Xmx1500M -Dfile.encoding=UTF-8 javacommand: WEB-INF\lib\mx.jar -o application_prod.conf -m prod Some information in application.conf #Set more threads in Jetty JettyMaxThreads=250 JettyMinThreads=16 #Sets the cap on the total number of active instances from the pool. ConnectionPoolingMaxActive = 700 Server information: - Operating System: Windows Server 2003, Standard Edition Service Pack 2 - Processor: Intel(R) Pentium(R) III Xeon processor (4 CPUs), ~2.0GHz - Memory: 4094MB RAM Thank you all for the help.
asked
4 answers
3

My current virtual memory is :

Drive C: Space available 70xxx MB

Initial size (MB) : 2046
Maximum size (MB) : 4092

answered
2

From page 167 of the JDK 5.0 Troubleshooting guide. http://java.sun.com/javase/

java.lang.OutOfMemoryError: request <size> bytes for <reason>. Out of swap space? Although it appears that an OutOfMemoryError is thrown this apparent exception is reported by the HotSpot VM code when an allocation from the native heap failed and the native heap may be close to exhaustion. The message indicates the size (in bytes) of the request that failed and also indicates what the memory is required for. In some cases the reason will be shown but in most cases the reason will be the name of a source module reporting the allocation failure. If an OutOfMemoryError with this error is thrown it may require using utilities on the operating system to diagnose the issue further. Examples of issues that may not be related to the application are when the operating system is configured with insufficient swap space, or when there is another process on the system that is consuming all memory resources. If neither of these issues is the cause then it is possible that the application is failed due to native leak; for example, application or library code is continuously allocating memory but is not releasing it to the operating system.it to the operating system.

How much swap space does the OS have?

answered
2

Sorry for my late reply and thank you all suggestion

We don't have any process use a lot of memory Sometimes,I started three XAS Instance(Production,Acceptance,Upgrade) for our users. Even though I stop Acceptance and Upgrade environment,This problem is still a live

answered
1

You're running with 256mb as long as i can see. Maybe increasing this will help.

answered