users@glassfish.java.net

RE: Re: java.lang.OutOfMemoryError: unable to create new native thread

From: Deepu Syamaladevi Janardhananachary (UST, IND) <"Deepu>
Date: Thu, 18 Feb 2010 18:48:33 +0530

Thank you Trond.

There was a leakage in the application and we have corrected it. After doing a load test till now no problem is showing. Also the thread count is not increasing much.

Regards,
Deepu Janardhananachary

-----Original Message-----
From: Trond.Stromme_at_Sun.COM [mailto:Trond.Stromme_at_Sun.COM]
Sent: Wednesday, February 17, 2010 3:52 PM
To: users_at_glassfish.dev.java.net
Cc: glassfish_at_javadesktop.org
Subject: Re: java.lang.OutOfMemoryError: unable to create new native thread

Hi,
I've answered a couple of your questions below. For the inclusion of
patches etc.. I'll let someone else answer that.
On 2/15/10 12:29 PM, glassfish_at_javadesktop.org wrote:
> Hi
> I have 4 questions.
>
> As per the reported bug# 3148 in Glassfish this is resolved in beta3 branch b50g
> https://glassfish.dev.java.net/issues/show_bug.cgi?id=3148
>
I'll venture a guess here, I might be wrong.
IIRC this is b50 of 9.1, i believe b58 was the final release of 9.1,
thus it's for a late beta of the same,
thus for b04 of 9.1_02, which is later than b58 of 9.1 then yes i
believe the fix should be in.. i can't say for sure, please corrct me if
i'm wrong

This blog http://blogs.sun.com/GlassFishForBusiness/ has loads of
information on patches available to customers that have purchased support.
> I am using the version "Sun Java System Application Server 9.1_02 (build b04-fcs)"
> Will this version includes the bug fix?
>
> How will I set GC log through the admin GUI? or through the command prompt?
>
You can do both.
In the admin console go to
Application Server/JVM Settings/JVM options
Add GC settings as JVM Settings like:
-verbose:gc
Then set the number of settings you need for the verboseness of the
logging like:

-XX:+PrintHeapAtGC
-XX:+PrintGCDetails

if you want to route the gc logging to a separate file (not to jvm.out)
then set
-Xloggc:/tmp/gclog (obviously replace with a filename of your own)

All this can also be done using asadmin like:
asadmin create-jvm-option "-verbose\:gc"
asadmin create-jvm-option "-XX\:+PrintHeapAtGC"
etc..
note the escaped syntax for the : character
> Do I need to increase the heap size in Application server-->JVM Settings-->JVM Options???
>
Dufficult to say. the "unable to create new thread" may be a result of a
too large heap with resulting too large stack sizes for the threads, you
can try to reduce the stacksize.
Please google the exception.
However since this happens after a while it may be that you have a
slowly accumulating memory leak somewhere.
> How can I fix the following error?
> I got OutOfMemoryError when running for long time(6days) and got the following in the server.log
>
>
> [#|2010-02-13T04:04:08.292-0600|SEVERE|sun-appserver9.1|javax.enterprise.resource.corba.ee._CORBA_.rpc.transport|_ThreadID=21;_ThreadName=Thread-26;java.lang.OutOfMemoryError: unable to create new native thread;_RequestID=5d42aaf0-7895-4abf-b6c7-a5f3059ec129;|"IOP00710313: (INTERNAL) Worker thread creation failure; cause java.lang.OutOfMemoryError: unable to create new native thread."
> org.omg.CORBA.INTERNAL: vmcid: SUN minor code: 313 completed: No
> at com.sun.corba.ee.impl.logging.ORBUtilSystemException.workerThreadCreationFailure(ORBUtilSystemException.java:7766)
> at com.sun.corba.ee.impl.logging.ORBUtilSystemException.workerThreadCreationFailure(ORBUtilSystemException.java:7789)
> at com.sun.corba.ee.impl.orbutil.threadpool.ThreadPoolImpl.createWorkerThread(ThreadPoolImpl.java:356)
> at com.sun.corba.ee.impl.orbutil.threadpool.WorkQueueImpl.addWork(WorkQueueImpl.java:161)
> at com.sun.enterprise.connectors.work.WorkCoordinator.submitWork(WorkCoordinator.java:131)
> at com.sun.enterprise.connectors.work.CommonWorkManager.scheduleWork(CommonWorkManager.java:254)
> at com.sun.enterprise.connectors.work.CommonWorkManager.scheduleWork(CommonWorkManager.java:228)
> at com.sun.genericra.inbound.InboundJmsResource.start(InboundJmsResource.java:77)
> at com.tibco.tibjms.TibjmsConnectionConsumer._dispatchMessages(TibjmsConnectionConsumer.java:193)
> at com.tibco.tibjms.TibjmsConnectionConsumer$MR.run(TibjmsConnectionConsumer.java:57)
> at java.lang.Thread.run(Thread.java:619)
> |#]
>
> [#|2010-02-13T04:04:19.045-0600|FINER|sun-appserver9.1|com.sun.genericjmsra|_ThreadID=21;_ThreadName=Thread-26;ClassName=com.sun.genericra.inbound.InboundJmsResourcePool;MethodName=_getServerSession;_RequestID=5d42aaf0-7895-4abf-b6c7-a5f3059ec129;|JMS provider is getting the ServerSession|#]
>
> [#|2010-02-13T04:04:19.046-0600|FINE|sun-appserver9.1|com.sun.genericjmsra|_ThreadID=21;_ThreadName=Thread-26;ClassName=com.sun.genericra.inbound.InboundJmsResourcePool$PauseObject;MethodName=pause;_RequestID=5d42aaf0-7895-4abf-b6c7-a5f3059ec129;|Waiting for :1266055459046|#]
>
> [#|2010-02-13T04:09:07.347-0600|WARNING|sun-appserver9.1|sun.rmi.transport.tcp|_ThreadID=8163;_ThreadName=RMI TCP Accept-0;_RequestID=d12ba3e5-cd6b-42de-b31b-856674db5210;|RMI TCP Accept-0: accept loop for ServerSocket[addr=0.0.0.0/0.0.0.0,port=0,localport=53213] throws
> java.lang.OutOfMemoryError: unable to create new native thread
> at java.lang.Thread.start0(Native Method)
> at java.lang.Thread.start(Thread.java:597)
> at java.util.concurrent.ThreadPoolExecutor.addIfUnderMaximumPoolSize(ThreadPoolExecutor.java:727)
> at java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:657)
> at sun.rmi.transport.tcp.TCPTransport$AcceptLoop.executeAcceptLoop(TCPTransport.java:384)
> at sun.rmi.transport.tcp.TCPTransport$AcceptLoop.run(TCPTransport.java:341)
> at java.lang.Thread.run(Thread.java:619)
> |#]
> [Message sent by forum member 'deepujs' (deepu.janardhananachary_at_ust-global.com)]
>
> http://forums.java.net/jive/thread.jspa?messageID=386742
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>
>


--

Trond Strømme
Application Platform Ambassador
Sun Microsystems Nordic, Professional Services
+47 975 09 388
http://blog.sun.com/tronds


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
For additional commands, e-mail: users-help_at_glassfish.dev.java.net