You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@activemq.apache.org by "ASF subversion and git services (JIRA)" <ji...@apache.org> on 2015/10/28 14:44:27 UTC

[jira] [Commented] (AMQ-5605) High CPU load when using failover transport in network connector

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

ASF subversion and git services commented on AMQ-5605:
------------------------------------------------------

Commit 756fa656b37df24bfe41679f8db238c021fe5f8b in activemq's branch refs/heads/activemq-5.11.x from [~tabish121]
[ https://git-wip-us.apache.org/repos/asf?p=activemq.git;h=756fa65 ]

https://issues.apache.org/jira/browse/AMQ-5605

Attempt to resolve high CPU usage after error by ensuring that the
transport is disposed along with the fire of the local error. 

> High CPU load when using failover transport in network connector
> ----------------------------------------------------------------
>
>                 Key: AMQ-5605
>                 URL: https://issues.apache.org/jira/browse/AMQ-5605
>             Project: ActiveMQ
>          Issue Type: Bug
>    Affects Versions: 5.11.0, 5.11.1
>         Environment: Ubuntu 14.04, SuSE Enterprise 11.3
>            Reporter: Lars Neumann
>              Labels: failover
>             Fix For: 5.12.0
>
>
> I've got a configuration with two master/slave setups consisting of 3 ActiveMQ instances each. They are deployed on three servers, with one ActiveMQ instance from each master/slave setup on every server. They are using the leveldb and zookeeper. Everything works fine.
> Now I've got the strange behaviour that when I add a network connector to each ActiveMQ instance like this:
> {code}
> networkConnector name="toMasterSlave02" dynamicOnly="true" uri="masterslave:(tcp://host1:61617,tcp://host2:61617,tcp://host3:61617)"
> {code}
> When you now restart the master of the master/slave setup that is targeted by the above network connector the cpu load on the current master goes and stays up at 100%, i.e. it uses one CPU per configured transportConnector.
> Now the explanation, mostly copied from http://activemq.2283324.n4.nabble.com/High-CPU-load-with-network-connector-failover-transport-tp4691798.html
> {quote}
> When one of the brokers is restarted, the other broker uses ~400% CPU. The cause is the FailoverTransport reconnectTask spinning, and nothing is stopping the task.
> Reverting this fix made for AMQ-5315, while it does reintroduce the NullPointerException, does handle failover properly without spinning:
> https://git1-us-west.apache.org/repos/asf/activemq/repo?p=activemq.git;a=commitdiff;h=c391321d1b5b59542d847717654b0d4dba54cf2f <https://git1-us-west.apache.org/repos/asf/activemq/repo?p=activemq.git;a=commitdiff;h=c391321d1b5b59542d847717654b0d4dba54cf2f>
> The reason it works after reverting that change is the NullPointerException is caught, -> serviceLocalException() -> ServiceSupport.dispose(getControllingService()); with the fix made in AMQ-5315, the dispose() call is never made. 
> {quote}
> Sorry, but I've got no clue how to provide a unit test for this. Maybe someone else can help.



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