You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by nelsoncc <ne...@novabase.pt> on 2015/03/13 20:57:27 UTC

ActiveMQ High number of threads

Hi everyone,

I'm using failover connection to connect to the broker.
When the broker stops, my application start to have more threads and keep
growing...
Only when the broker starts again the number of threads is reduced to its
normal size.

Can anyone help me with this issue?

Kind regards,
Nelson Cintra



--
View this message in context: http://activemq.2283324.n4.nabble.com/ActiveMQ-High-number-of-threads-tp4693185.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: ActiveMQ High number of threads

Posted by Tim Bain <tb...@alumni.duke.edu>.
I'd recommend taking a thread dump to figure out what those threads are
doing, and then attach a debugger and set appropriate breakpoints so you
can step through the code and figure out why they're doing what they're
doing...

Tim

On Fri, Mar 13, 2015 at 1:57 PM, nelsoncc <ne...@novabase.pt> wrote:

> Hi everyone,
>
> I'm using failover connection to connect to the broker.
> When the broker stops, my application start to have more threads and keep
> growing...
> Only when the broker starts again the number of threads is reduced to its
> normal size.
>
> Can anyone help me with this issue?
>
> Kind regards,
> Nelson Cintra
>
>
>
> --
> View this message in context:
> http://activemq.2283324.n4.nabble.com/ActiveMQ-High-number-of-threads-tp4693185.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>

Re: ActiveMQ High number of threads

Posted by nelsoncc <ne...@novabase.pt>.
Thanks for your help artnaseef.

I'll be waiting for this issue to be fixed. This is urgent for my project.

Kind Regards,
Nelson



--
View this message in context: http://activemq.2283324.n4.nabble.com/ActiveMQ-High-number-of-threads-tp4693185p4694087.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: ActiveMQ High number of threads

Posted by artnaseef <ar...@artnaseef.com>.
Here's a jira entry for this problem:
https://issues.apache.org/jira/browse/AMQCPP-569.




--
View this message in context: http://activemq.2283324.n4.nabble.com/ActiveMQ-High-number-of-threads-tp4693185p4693479.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: ActiveMQ High number of threads

Posted by artnaseef <ar...@artnaseef.com>.
Scratch that - the problem remains with debugging; I used the wrong URL the
second time.



--
View this message in context: http://activemq.2283324.n4.nabble.com/ActiveMQ-High-number-of-threads-tp4693185p4693477.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: ActiveMQ High number of threads

Posted by artnaseef <ar...@artnaseef.com>.
I reproduced this problem locally and then enabled debugging when compiling
the client application.  With debugging enabled, the problem goes away. 
Interesting.



--
View this message in context: http://activemq.2283324.n4.nabble.com/ActiveMQ-High-number-of-threads-tp4693185p4693476.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: ActiveMQ High number of threads

Posted by nelsoncc <ne...@novabase.pt>.
This issue happens when my URI is:
failover:(tcp://MACHINE_1:61616,tcp://MACHINE_2:61616)?randomize=false&useExponentialBackOff=false&initialReconnectDelay=1000&startupMaxReconnectAttempts=40&timeout=30000

When I change to only 1 machine, the number of threads stays stable:
failover:(tcp://MACHINE_1:61616)?randomize=false&useExponentialBackOff=false&initialReconnectDelay=1000&startupMaxReconnectAttempts=40&timeout=30000

Does anyone already had this issue?



--
View this message in context: http://activemq.2283324.n4.nabble.com/ActiveMQ-High-number-of-threads-tp4693185p4693293.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: ActiveMQ High number of threads

Posted by nelsoncc <ne...@novabase.pt>.
I've found another thread with similiar issue:
https://issues.apache.org/jira/browse/AMQCPP-451

But it says that was fixed in version 3.6.x. Maybe this is another issue



--
View this message in context: http://activemq.2283324.n4.nabble.com/ActiveMQ-High-number-of-threads-tp4693185p4693195.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: ActiveMQ High number of threads

Posted by nelsoncc <ne...@novabase.pt>.
Hi,

I'm using ActiveMQ-CPP version 3.8.4.

I'm using solaris OS in a platform that right now I can't make debug 

Full Stack trace:
  pstack_trace.7z
<http://activemq.2283324.n4.nabble.com/file/n4693194/pstack_trace.7z>  

This is an application server that sends message sometimes to the broker.
This issue can be reproduced in any application using a producer with
failover in URI.
When application starts it connects successfully to the broker. Then stop
the broker, and the number of threads starts to grow.

Kind regards,
Nelson Cintra



--
View this message in context: http://activemq.2283324.n4.nabble.com/ActiveMQ-High-number-of-threads-tp4693185p4693194.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: ActiveMQ High number of threads

Posted by artnaseef <ar...@artnaseef.com>.
Is this using ActiveMQ-CPP?  What versions of software are in-use?

Can you provide the full stack trace as well?

One thing that will really help narrow this down is to have a minimal
application that reproduces the problem.  Could you trim down your
application to the bare-minimum code that exhibits this problem and share
it?



--
View this message in context: http://activemq.2283324.n4.nabble.com/ActiveMQ-High-number-of-threads-tp4693185p4693188.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.