You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@activemq.apache.org by "Christopher L. Shannon (JIRA)" <ji...@apache.org> on 2015/06/16 22:25:02 UTC

[jira] [Commented] (AMQ-5846) High cpu usage if using masterslave discovery in network brokers

    [ https://issues.apache.org/jira/browse/AMQ-5846?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14588707#comment-14588707 ] 

Christopher L. Shannon commented on AMQ-5846:
---------------------------------------------

This sounds to me like this is the correct behavior of the failover transport by default.  The reconnect logic is going to rapidly try and connect over and over again unless you tune it to slow down and that is probably what is spiking your cpu so high.  

For tuning, you can try setting reconnectDelay or initialReconnectDelay to something longer.  The default initialReconnectelay is only 10 ms.  You can also try playing around with exponential back off and enable useExponentialBackOff which should lower your cpu usage.  See http://activemq.apache.org/failover-transport-reference.html for all of the configuration options.

> High cpu usage if using masterslave discovery in network brokers
> ----------------------------------------------------------------
>
>                 Key: AMQ-5846
>                 URL: https://issues.apache.org/jira/browse/AMQ-5846
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Broker
>    Affects Versions: 5.11.1
>            Reporter: duff qiu
>
> I setup a network brokers with 2 nodes (A, and B)
> In the config, the A and B use masterslave discovery.
> If I start A first, and then start B, I found that the cpu usaging in the machine running A is very high (~100). But The B doens't like that because B can connect to A at the first time.
> I try to use the static:failover way, then the problem is the same (static:failover:()?randomize=false&maxReconnectAttempts=0)
> But I try to remove the "maxReconnectAttempts=0' or set the value more than 10 , the issue disapeared.
> I think there are some issues on the network transfer impl how to handle the maxReconnectAttempts



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)