activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Filip Hanik - Dev Lists <devli...@hanik.com>
Subject Re: ActiveMQ Transport Server OutOfMemoryError while running load test
Date Fri, 26 Oct 2007 23:16:55 GMT
if you look at the message

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

this will tell you that it has nothing to do with your Xmx setting. 
Threads and thread stacks are allocated outside your Java heap (ie, your Xms and Xmx settings)
and you've simply run out of space to create new threads.

This could be memory related or just some configuration on your OS on how many threads you
have set.

if it is memory related and if you have set -Xms to 1024m as well, lower it to something like
128m, then set your -Xss, to something low, maybe 128k

and try your test again.

Filip



Ken Ringdahl wrote:
> I'm running a load test that intends to throw on the order of several
> thousand connections at a 2 node broker system with failover (ActiveMQ
> 4.1.1) configured for tcp transport only.  However, I'm just using a single
> broker node right now and am getting out of memory errors at about 400
> connections.  I've set the Xmx to 1024M and the memory is only ~110 MB when 
> this error occurs in the log.  I've pasted the exceptions below.  The latter
> 2 exceptions do not immediately follow the first.  They come maybe a minute
> or so later.  I've tried setting the preFetch to 1 in case it's keeping
> messages in memory.  But, to be honest, my test doesn't send messages until
> all of the connections have been established.  Any suggestions as to what
> might be the problem here?
>
>
>
> jvm 1    | Exception in thread "ActiveMQ Transport Server:
> tcp://localhost:61616" java.lang.OutOfMemoryError: unable to create new
> native thread
> jvm 1    |      at java.lang.Thread.start0(Native Method)
> jvm 1    |      at java.lang.Thread.start(Thread.java:574)
> jvm 1    |      at
> org.apache.activemq.thread.DedicatedTaskRunner.<init>(DedicatedTaskRunner.java:45)
> jvm 1    |      at
> org.apache.activemq.thread.TaskRunnerFactory.createTaskRunner(TaskRunnerFactory.java:77)
> jvm 1    |      at
> org.apache.activemq.broker.TransportConnection.<init>(TransportConnection.java:174)
> jvm 1    |      at
> org.apache.activemq.broker.jmx.ManagedTransportConnection.<init>(ManagedTransportConnection.java:55)
> jvm 1    |      at
> org.apache.activemq.broker.jmx.ManagedTransportConnector.createConnection(ManagedTransportConnector.java:56)
> jvm 1    |      at
> org.apache.activemq.broker.TransportConnector$1.onAccept(TransportConnector.java:147)
> jvm 1    |      at
> org.apache.activemq.transport.tcp.TcpTransportServer.run(TcpTransportServer.java:167)
> jvm 1    |      at java.lang.Thread.run(Thread.java:595)
> jvm 1    | Exception in thread "RMI RenewClean-[172.16.105.110:36883]"
> java.lang.OutOfMemoryError: unable to create new native thread
> jvm 1    |      at java.lang.Thread.start0(Native Method)
> jvm 1    |      at java.lang.Thread.start(Thread.java:574)
> jvm 1    |      at
> sun.rmi.transport.tcp.TCPChannel.free(TCPChannel.java:321)
> jvm 1    |      at sun.rmi.server.UnicastRef.free(UnicastRef.java:395)
> jvm 1    |      at sun.rmi.server.UnicastRef.done(UnicastRef.java:412)
> jvm 1    |      at sun.rmi.transport.DGCImpl_Stub.dirty(Unknown Source)
> jvm 1    |      at
> sun.rmi.transport.DGCClient$EndpointEntry.makeDirtyCall(DGCClient.java:328)
> jvm 1    |      at
> sun.rmi.transport.DGCClient$EndpointEntry.access$1600(DGCClient.java:144)
> jvm 1    |      at
> sun.rmi.transport.DGCClient$EndpointEntry$RenewCleanThread.run(DGCClient.java:539)
> jvm 1    |      at java.lang.Thread.run(Thread.java:595)
> jvm 1    | Exception in thread "ActiveMQ Journal Checkpoint Worker"
> java.lang.OutOfMemoryError: unable to create new native thread
> jvm 1    |      at java.lang.Thread.start0(Native Method)
> jvm 1    |      at java.lang.Thread.start(Thread.java:574)
> jvm 1    |      at
> edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor.addIfUnderCorePoolSize(ThreadPoolExecutor.java:429)
> jvm 1    |      at
> edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:857)
> jvm 1    |      at
> org.apache.activemq.store.journal.JournalPersistenceAdapter.doCheckpoint(JournalPersistenceAdapter.java:376)
> jvm 1    |      at
> org.apache.activemq.store.journal.JournalPersistenceAdapter$2.iterate(JournalPersistenceAdapter.java:129)
> jvm 1    |      at
> org.apache.activemq.thread.DedicatedTaskRunner.runTask(DedicatedTaskRunner.java:101)
> jvm 1    |      at
> org.apache.activemq.thread.DedicatedTaskRunner.access$000(DedicatedTaskRunner.java:25)
> jvm 1    |      at
> org.apache.activemq.thread.DedicatedTaskRunner$1.run(DedicatedTaskRunner.java:39)
>
>   


Mime
View raw message