You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by matteor <ma...@abodata.com> on 2013/11/12 22:42:53 UTC

Proxy Connector memory consumption

I configured a ProxyConnector nio+ssl transport. When it is used coupled with
an external load balancer (over which I have no control at all) I get a
quite annoying behavior: the balancer keeps opening connections towards the
proxy connector just to assess its responsiveness. The net effect of this is
that the memory consumption of the Proxy broker skyrockets. 
I reproduced the behavior of the balancer with a simple java program that
repeatedly opens a series of connection to the proxy connector and then let
them dangling (that is, I just shutdown the thread client-side without
closing the connection gracefully). Again, the memory consumption of Proxy
Broker keeps growing and never decrease. At the end I get more than 6 GB of
memory allocated just because of tons of ProxyConnection that are not
recycled by the gc. The result is that the ProxyBroker spits out an OOM
error.

Mutual authentication is off. I saw these effects both in AMQ 5.8.0 and AMQ
5.9.0.

So the questions are:
- Is it possible to limit somehow the memory consumption of proxy broker?
Apparently the memoryUsage param has no effect.
- Why dangling ProxyConnections are not deleted by the ProxyConnector? Is it
possible to specify a timeout for them?

Thank you for your help!




--
View this message in context: http://activemq.2283324.n4.nabble.com/Proxy-Connector-memory-consumption-tp4674255.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: Proxy Connector memory consumption

Posted by matteor <ma...@abodata.com>.
I added a tentative patch to the issue (AMQ-4889).

As long as I can see, the problem was adding ProxyConnection objs into a
collection inside ProxyConnector before starting them.





--
View this message in context: http://activemq.2283324.n4.nabble.com/Proxy-Connector-memory-consumption-tp4674255p4674940.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: Proxy Connector memory consumption

Posted by matteor <ma...@abodata.com>.
Ok, issue created: AMQ-4889

I attached to the issue a couple of simple projects to reproduce the issue.

Apparently this issue affects the ProxyConnector only, not the standard
TransportConnector.



--
View this message in context: http://activemq.2283324.n4.nabble.com/Proxy-Connector-memory-consumption-tp4674255p4674527.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: Proxy Connector memory consumption

Posted by Christian Posta <ch...@gmail.com>.
it would be awesome if you could put together a little unit test that
shows this and open a jira. then we can fix it asap.

take some inspiration from the tests here:
https://github.com/apache/activemq/tree/trunk/activemq-unit-tests/src/test/java/org/apache/activemq/proxy




On Wed, Nov 13, 2013 at 12:06 PM, matteor <ma...@abodata.com> wrote:
> Nobody?
> Is the question so boring?
>
>
>
> --
> View this message in context: http://activemq.2283324.n4.nabble.com/Proxy-Connector-memory-consumption-tp4674255p4674390.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.



-- 
Christian Posta
http://www.christianposta.com/blog
twitter: @christianposta

Re: Proxy Connector memory consumption

Posted by matteor <ma...@abodata.com>.
Nobody? 
Is the question so boring?



--
View this message in context: http://activemq.2283324.n4.nabble.com/Proxy-Connector-memory-consumption-tp4674255p4674390.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.