You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Jason Queen <Ja...@colinx.com> on 2012/06/20 22:52:17 UTC
Memory Leak
We are running a Karaf 2.2.7 server with camel 2.8.4 routes that moves
message from an ActiveMQ 5.6.0 standalone instance to a WebsphereMQ server
and vice versa. After running for around 2 weeks Karaf starts throwing Out
of Memory Error and has to be restarted. The routes are pretty simple and
only have about 8 total:
from("activemq:ORDER_ENTRY").id("Order
Entry")..bean(Order.class,"process").to(WEBSPHERE +":S2S.CLXPTB.ORDERS");
// connection code
ActiveMQComponent amq = new ActiveMQComponent();
amq.setTransacted(true);
amq.setBrokerURL(Environment.getProperty("amqBrokerURL") );
amq.setUserName(Environment.getProperty("amqUsername") );
amq.setPassword(Environment.getProperty("amqPassword") );
this.getContext().addComponent("activemq", amq);
java params: -server -Xmx786M -Xms256M -XX:+UseG1GC -XX:MaxPermSize=128m
I was able to get a heapdump and analyze it using mat. It points to 3
org.apache.activemq.pool.PooledSession objects that are each consuming 30%
or more of the space. When I drill down into it there seems to be an
overwhelming number of references to PooledConnection and
CopyOnWriteArrayList objects that continues to grow over time. I checked
the web for this issue and found that a bunch of similar memory leaks were
fix when going for AMQ 5.5.1 to AMQ 5.6.0. Could it still have a memory
leak or maybe the way camel calls the pool could cause it?
--
View this message in context: http://camel.465427.n5.nabble.com/Memory-Leak-tp5714782.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Memory Leak
Posted by Filippo Balicchia <fb...@gmail.com>.
Did you try
http://www.atomikos.com
or
aries transaction ?
--Filippo
2012/6/21 Jason Queen <Ja...@colinx.com>:
> Christian,
>
> Yes I will try setting it with Spring's
> org.springframework.jms.connection.JmsTransactionManager and the flag on the
> routes. We have only used WMQ up until recent, so im new to using AMQ. The
> WMQ components wouldnt start up without one defined until i configured it
> with a manager. I assumed that when AMQ started and worked with the flag
> set all was good, maybe using its own manager or something. I will try and
> respond with my findings. If this is the issue, shouldn't AMQ's client
> error if a manager isn't set and the transacted flag is set and the route
> tries to use transacted() and the manager's dont exist?
>
> Either way many many thanks for the advice! Also, is there any better
> transaction manager than Spring's implementation?
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Memory-Leak-tp5714782p5714793.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Memory Leak
Posted by Jason Queen <Ja...@colinx.com>.
Christian,
Yes I will try setting it with Spring's
org.springframework.jms.connection.JmsTransactionManager and the flag on the
routes. We have only used WMQ up until recent, so im new to using AMQ. The
WMQ components wouldnt start up without one defined until i configured it
with a manager. I assumed that when AMQ started and worked with the flag
set all was good, maybe using its own manager or something. I will try and
respond with my findings. If this is the issue, shouldn't AMQ's client
error if a manager isn't set and the transacted flag is set and the route
tries to use transacted() and the manager's dont exist?
Either way many many thanks for the advice! Also, is there any better
transaction manager than Spring's implementation?
--
View this message in context: http://camel.465427.n5.nabble.com/Memory-Leak-tp5714782p5714793.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Memory Leak
Posted by Christian Müller <ch...@gmail.com>.
You set transacted to true but didn't provide a transaction manager. In
your Camel route you also don't use transacted(). This looks false. Could
you change this?
Best,
Christian
Sent from a mobile device
Am 20.06.2012 22:52 schrieb "Jason Queen" <Ja...@colinx.com>:
> We are running a Karaf 2.2.7 server with camel 2.8.4 routes that moves
> message from an ActiveMQ 5.6.0 standalone instance to a WebsphereMQ server
> and vice versa. After running for around 2 weeks Karaf starts throwing Out
> of Memory Error and has to be restarted. The routes are pretty simple and
> only have about 8 total:
>
> from("activemq:ORDER_ENTRY").id("Order
> Entry")..bean(Order.class,"process").to(WEBSPHERE +":S2S.CLXPTB.ORDERS");
>
> // connection code
> ActiveMQComponent amq = new ActiveMQComponent();
> amq.setTransacted(true);
> amq.setBrokerURL(Environment.getProperty("amqBrokerURL") );
> amq.setUserName(Environment.getProperty("amqUsername") );
> amq.setPassword(Environment.getProperty("amqPassword") );
> this.getContext().addComponent("activemq", amq);
>
> java params: -server -Xmx786M -Xms256M -XX:+UseG1GC -XX:MaxPermSize=128m
>
> I was able to get a heapdump and analyze it using mat. It points to 3
> org.apache.activemq.pool.PooledSession objects that are each consuming 30%
> or more of the space. When I drill down into it there seems to be an
> overwhelming number of references to PooledConnection and
> CopyOnWriteArrayList objects that continues to grow over time. I checked
> the web for this issue and found that a bunch of similar memory leaks were
> fix when going for AMQ 5.5.1 to AMQ 5.6.0. Could it still have a memory
> leak or maybe the way camel calls the pool could cause it?
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/Memory-Leak-tp5714782.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>