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: java.lang.OutOfMemoryError: unable to create new native thread on AMQ 5.0
Date Thu, 22 May 2008 14:28:38 GMT
Danilo Tuler wrote:
> Hi Filip,
>
>
> Filip Hanik - Dev Lists wrote:
>   
>> essentially, it's more of a tuning thingy then a memory leak, if one 
>> needs that many topics/queues, then not running with the dedicated task 
>> runner sounds like the solution,
>>
>>     
>
> I didn't understand why you classify this issue as a "tuning thingy" and not
> a bug.
>   
no problem, let me see if I can explain it better.
from my understanding, UseDedicatedTaskRunner creates a thread per 
session (or connection, I would have to check).

in the test case provided, the program is trying to create 5000+ 
connections/sessions, hence that would require 5000 threads, not very 
scalable.

so to "tune" this, one would turn off the dedicated task runner, and 
that solves the problem.

If one insisted on having 5000 threads, then one would carefully have to 
tune -Xmx (lower it) and -Xss (lower it) to be able to fit that many 
threads in the JVM, I suspect the test case ran in a 32 bit JVM where 
you have a fixed size of the process heap. And raising the -Xmx flag 
will lower the number of threads you can run in the JVM


> I guess I don't know AMQ internals enough to get that.
> All I know about AMQ thread handling is what I read from [1], which may
> refer to AMQ 4.x.
>
> Where can I find documentation for the UseDedicatedTaskRunner property?
>   
source code? prolly not what you wanna hear

Filip
> Thanks,
> Danilo
>
>
> [1]
> http://open.iona.com/wiki/display/ProdInfo/Understanding+the+Threads+Allocated+in+ActiveMQ
>
>   


Mime
View raw message