You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by "stefan.moser" <st...@wolverton.ca> on 2008/12/18 20:38:12 UTC

Re: java.lang.OutOfMemoryError: unable to create new native thread on AMQ 5.0

Has there been any progress on this issue?  I've just started using ActiveMQ
and require a large number of topics.  I am getting the same OOME once it
creates ~1000 topics.  I've tried this with v 5.0, 5.1 and 5.2.

Thanks,
Stefan


Danilo Tuler wrote:
> 
> Hi Hiram,
> 
> 
> Hiram Chirino wrote:
>> 
>> Please post a stack trace of all those threads that on the broker side
>> when you run this test.
> 
> I'm attaching both debug logs from the server and the client.
> The OOME stack trace is below.
> 
> INFO   | jvm 1    | 2008/05/22 23:29:01 | java.lang.OutOfMemoryError:
> unable to create new native thread
> INFO   | jvm 1    | 2008/05/22 23:29:01 | 	at
> java.lang.Thread.start0(Native Method)
> INFO   | jvm 1    | 2008/05/22 23:29:01 | 	at
> java.lang.Thread.start(Unknown Source)
> INFO   | jvm 1    | 2008/05/22 23:29:01 | 	at
> org.apache.activemq.thread.DedicatedTaskRunner.<init>(DedicatedTaskRunner.java:42)
> INFO   | jvm 1    | 2008/05/22 23:29:01 | 	at
> org.apache.activemq.thread.TaskRunnerFactory.createTaskRunner(TaskRunnerFactory.java:79)
> INFO   | jvm 1    | 2008/05/22 23:29:01 | 	at
> org.apache.activemq.store.amq.AMQMessageStore.<init>(AMQMessageStore.java:92)
> INFO   | jvm 1    | 2008/05/22 23:29:01 | 	at
> org.apache.activemq.store.amq.AMQTopicMessageStore.<init>(AMQTopicMessageStore.java:46)
> INFO   | jvm 1    | 2008/05/22 23:29:01 | 	at
> org.apache.activemq.store.amq.AMQPersistenceAdapter.createTopicMessageStore(AMQPersistenceAdapter.java:455)
> INFO   | jvm 1    | 2008/05/22 23:29:01 | 	at
> org.apache.activemq.broker.region.DestinationFactoryImpl.createDestination(DestinationFactoryImpl.java:94)
> INFO   | jvm 1    | 2008/05/22 23:29:01 | 	at
> org.apache.activemq.broker.region.AbstractRegion.createDestination(AbstractRegion.java:425)
> INFO   | jvm 1    | 2008/05/22 23:29:01 | 	at
> org.apache.activemq.broker.jmx.ManagedTopicRegion.createDestination(ManagedTopicRegion.java:56)
> INFO   | jvm 1    | 2008/05/22 23:29:01 | 	at
> org.apache.activemq.broker.region.AbstractRegion.addDestination(AbstractRegion.java:120)
> INFO   | jvm 1    | 2008/05/22 23:29:01 | 	at
> org.apache.activemq.broker.region.RegionBroker.addDestination(RegionBroker.java:266)
> INFO   | jvm 1    | 2008/05/22 23:29:01 | 	at
> org.apache.activemq.broker.BrokerFilter.addDestination(BrokerFilter.java:141)
> INFO   | jvm 1    | 2008/05/22 23:29:01 | 	at
> org.apache.activemq.advisory.AdvisoryBroker.addDestination(AdvisoryBroker.java:147)
> INFO   | jvm 1    | 2008/05/22 23:29:01 | 	at
> org.apache.activemq.broker.BrokerFilter.addDestination(BrokerFilter.java:141)
> INFO   | jvm 1    | 2008/05/22 23:29:01 | 	at
> org.apache.activemq.broker.MutableBrokerFilter.addDestination(MutableBrokerFilter.java:148)
> INFO   | jvm 1    | 2008/05/22 23:29:01 | 	at
> org.apache.activemq.broker.region.RegionBroker.send(RegionBroker.java:425)
> INFO   | jvm 1    | 2008/05/22 23:29:01 | 	at
> org.apache.activemq.broker.TransactionBroker.send(TransactionBroker.java:224)
> INFO   | jvm 1    | 2008/05/22 23:29:01 | 	at
> org.apache.activemq.broker.BrokerFilter.send(BrokerFilter.java:125)
> INFO   | jvm 1    | 2008/05/22 23:29:01 | 	at
> org.apache.activemq.broker.CompositeDestinationBroker.send(CompositeDestinationBroker.java:95)
> INFO   | jvm 1    | 2008/05/22 23:29:01 | 	at
> org.apache.activemq.broker.MutableBrokerFilter.send(MutableBrokerFilter.java:132)
> INFO   | jvm 1    | 2008/05/22 23:29:01 | 	at
> org.apache.activemq.broker.TransportConnection.processMessage(TransportConnection.java:437)
> INFO   | jvm 1    | 2008/05/22 23:29:01 | 	at
> org.apache.activemq.command.ActiveMQMessage.visit(ActiveMQMessage.java:624)
> INFO   | jvm 1    | 2008/05/22 23:29:01 | 	at
> org.apache.activemq.broker.TransportConnection.service(TransportConnection.java:292)
> INFO   | jvm 1    | 2008/05/22 23:29:01 | 	at
> org.apache.activemq.broker.TransportConnection$1.onCommand(TransportConnection.java:180)
> INFO   | jvm 1    | 2008/05/22 23:29:01 | 	at
> org.apache.activemq.transport.TransportFilter.onCommand(TransportFilter.java:68)
> INFO   | jvm 1    | 2008/05/22 23:29:01 | 	at
> org.apache.activemq.transport.WireFormatNegotiator.onCommand(WireFormatNegotiator.java:143)
> INFO   | jvm 1    | 2008/05/22 23:29:01 | 	at
> org.apache.activemq.transport.InactivityMonitor.onCommand(InactivityMonitor.java:206)
> INFO   | jvm 1    | 2008/05/22 23:29:01 | 	at
> org.apache.activemq.transport.TransportSupport.doConsume(TransportSupport.java:84)
> INFO   | jvm 1    | 2008/05/22 23:29:01 | 	at
> org.apache.activemq.transport.tcp.TcpTransport.doRun(TcpTransport.java:196)
> INFO   | jvm 1    | 2008/05/22 23:29:01 | 	at
> org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:183)
> INFO   | jvm 1    | 2008/05/22 23:29:01 | 	at java.lang.Thread.run(Unknown
> Source)
>  http://www.nabble.com/file/p17417715/server.log server.log 
> http://www.nabble.com/file/p17417715/amq-log.zip amq-log.zip 
> 

-- 
View this message in context: http://www.nabble.com/java.lang.OutOfMemoryError%3A-unable-to-create-new-native-thread-on-AMQ-5.0-tp17005441p21079507.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: java.lang.OutOfMemoryError: unable to create new native thread on AMQ 5.0

Posted by "stefan.moser" <st...@wolverton.ca>.
Hi Gary,

I don't think there is a JIRA issue.  I have just discovered that the
setting I was using for the dedicated task runner was being ignored.  I'm
running ActiveMQ as a Windows Service and I just found that there is also a
setting for the dedicated task runner in bin\win32\wrapper.conf.  I was
using dedicatedTaskRunner="false" on the broker node in conf\activemq.xml
and it was being overridden by the setting in wrapper.conf.

Now that I have the dedicated task runner turned off, the number of threads
remains low and I am able to create more topics than before.  The problem
now is that there is so much context switching going on that it has
practically ground to halt.  I'm going to try to tweak the memory settings
and see if I can get better performance.

I still haven't been able to determine what the practical limit is for the
number of topics in ActiveMQ, but so far I'm still at least an order of
magnitude under what I require.

Thanks for your help Gary.

Cheers,
Stefan



Gary Tully wrote:
> 
> Stefan,
> is there a jira issue for this, if not can you open one and capture
> the problem with a test case. Is it that even with "dedicated task
> runner"=false there is a direct correlation between the number of
> threads and the number of destinations?
> 
> Or is it that the memory usage of a destination is too high?
> 
> Would like to get to the bottom of this.
> 
> 2008/12/18 stefan.moser <st...@wolverton.ca>:
>>
>> So this issue doesn't occur in 4.1?  I might consider downgrading because
>> I
>> have no other options at this point.
>>
>> Thanks,
>> Stefan
>>
>> Danilo Tuler wrote:
>>>
>>> Hi Stefan,
>>>
>>> I'm on the same boat.
>>> I'm hitting some 4.1 issues, and I'm considering (again) to migrate to
>>> 5.2.0.
>>> But this issue is pushing me back.
>>>
>>> Danilo
>>>
>>>
>>> stefan.moser wrote:
>>>>
>>>> Has there been any progress on this issue?  I've just started using
>>>> ActiveMQ and require a large number of topics.  I am getting the same
>>>> OOME once it creates ~1000 topics.  I've tried this with v 5.0, 5.1 and
>>>> 5.2.
>>>>
>>>> Thanks,
>>>> Stefan
>>>>
>>>
>>>
>>
>> --
>> View this message in context:
>> http://www.nabble.com/java.lang.OutOfMemoryError%3A-unable-to-create-new-native-thread-on-AMQ-5.0-tp17005441p21079903.html
>> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>>
>>
> 
> 
> 
> -- 
> http://blog.garytully.com
> 
> Open Source SOA
> http://FUSESource.com
> 
> 

-- 
View this message in context: http://www.nabble.com/java.lang.OutOfMemoryError%3A-unable-to-create-new-native-thread-on-AMQ-5.0-tp17005441p21095619.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: java.lang.OutOfMemoryError: unable to create new native thread on AMQ 5.0

Posted by Gary Tully <ga...@gmail.com>.
Stefan,
is there a jira issue for this, if not can you open one and capture
the problem with a test case. Is it that even with "dedicated task
runner"=false there is a direct correlation between the number of
threads and the number of destinations?

Or is it that the memory usage of a destination is too high?

Would like to get to the bottom of this.

2008/12/18 stefan.moser <st...@wolverton.ca>:
>
> So this issue doesn't occur in 4.1?  I might consider downgrading because I
> have no other options at this point.
>
> Thanks,
> Stefan
>
> Danilo Tuler wrote:
>>
>> Hi Stefan,
>>
>> I'm on the same boat.
>> I'm hitting some 4.1 issues, and I'm considering (again) to migrate to
>> 5.2.0.
>> But this issue is pushing me back.
>>
>> Danilo
>>
>>
>> stefan.moser wrote:
>>>
>>> Has there been any progress on this issue?  I've just started using
>>> ActiveMQ and require a large number of topics.  I am getting the same
>>> OOME once it creates ~1000 topics.  I've tried this with v 5.0, 5.1 and
>>> 5.2.
>>>
>>> Thanks,
>>> Stefan
>>>
>>
>>
>
> --
> View this message in context: http://www.nabble.com/java.lang.OutOfMemoryError%3A-unable-to-create-new-native-thread-on-AMQ-5.0-tp17005441p21079903.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>
>



-- 
http://blog.garytully.com

Open Source SOA
http://FUSESource.com

Re: java.lang.OutOfMemoryError: unable to create new native thread on AMQ 5.0

Posted by "stefan.moser" <st...@wolverton.ca>.
So this issue doesn't occur in 4.1?  I might consider downgrading because I
have no other options at this point.

Thanks,
Stefan

Danilo Tuler wrote:
> 
> Hi Stefan,
> 
> I'm on the same boat.
> I'm hitting some 4.1 issues, and I'm considering (again) to migrate to
> 5.2.0.
> But this issue is pushing me back.
> 
> Danilo
> 
> 
> stefan.moser wrote:
>> 
>> Has there been any progress on this issue?  I've just started using
>> ActiveMQ and require a large number of topics.  I am getting the same
>> OOME once it creates ~1000 topics.  I've tried this with v 5.0, 5.1 and
>> 5.2.
>> 
>> Thanks,
>> Stefan
>> 
> 
> 

-- 
View this message in context: http://www.nabble.com/java.lang.OutOfMemoryError%3A-unable-to-create-new-native-thread-on-AMQ-5.0-tp17005441p21079903.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: java.lang.OutOfMemoryError: unable to create new native thread on AMQ 5.0

Posted by Danilo Tuler <tu...@ideais.com.br>.
Hi Stefan,

I'm on the same boat.
I'm hitting some 4.1 issues, and I'm considering (again) to migrate to
5.2.0.
But this issue is pushing me back.

Danilo


stefan.moser wrote:
> 
> Has there been any progress on this issue?  I've just started using
> ActiveMQ and require a large number of topics.  I am getting the same OOME
> once it creates ~1000 topics.  I've tried this with v 5.0, 5.1 and 5.2.
> 
> Thanks,
> Stefan
> 

-- 
View this message in context: http://www.nabble.com/java.lang.OutOfMemoryError%3A-unable-to-create-new-native-thread-on-AMQ-5.0-tp17005441p21079855.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.