activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From easyl <easy....@gmail.com>
Subject Re: ActiveMQConnection leaks memory by caching ActiveMQTempQueue objects
Date Thu, 29 Apr 2010 09:29:25 GMT

Hallo,

I did not pool the AMQ connection by myself, but setting a pool in Geronimo
for AMQ.
Therefore I can understand why there are always some ActiveMQConnection
staying in memory.



> <conn:resourceadapter>
>   <conn:resourceadapter-instance>
>     <conn:resourceadapter-name>jmsResources</conn:resourceadapter-name>
>     <conn:config-property-setting
> name="ServerUrl">tcp://localhost:61616?keepAlive=true&amp;jms.copyMessageOnSend=false&amp;jms.watchTopicAdvisories=false&amp;socket.tcpNoDelay=true&amp;wireFormat.tcpNoDelayEnabled=true</conn:config-property-setting>
>     <nam:workmanager>
>       <nam:gbean-link>DefaultWorkManager</nam:gbean-link>
>     </nam:workmanager>
>   </conn:resourceadapter-instance>
>   <conn:outbound-resourceadapter>
>     <conn:connection-definition>
>      
> <conn:connectionfactory-interface>javax.jms.ConnectionFactory</conn:connectionfactory-interface>
>       <conn:connectiondefinition-instance>
>         <conn:name>jmsCF</conn:name>
>        
> <conn:implemented-interface>javax.jms.QueueConnectionFactory</conn:implemented-interface>
>         <conn:connectionmanager>
>           <conn:xa-transaction>
>             <conn:transaction-caching />
>           </conn:xa-transaction>
>           <conn:single-pool>
>             <conn:max-size>150</conn:max-size>
>             <conn:min-size>70</conn:min-size>									
>            
> <conn:blocking-timeout-milliseconds>30000</conn:blocking-timeout-milliseconds>
>             <conn:match-one />
>           </conn:single-pool>
>         </conn:connectionmanager>
>       </conn:connectiondefinition-instance>
>     </conn:connection-definition>
>   </conn:outbound-resourceadapter>
> </conn:resourceadapter>
> 

the 1.5 GB objects are almost from the HashMaps, holding ActiveMQTempQueue,
referenced by those ActiveMQConnection.

what I cannot understand is that why those ActiveMQTempQueue are always
there even I close the connection.

I am trying to run different application on different JVM and let them
send/reply messages to/from each other, therefore I use TCP transport. Can I
use VM Transport across JVM, did I misunderstand the meaning of transport?


Ivan Pechorin wrote:
> 
> Hello,
> 
> 2010/4/29 easyl <easy.lin@gmail.com>:
>> AMQ 5.3 in Geronimo 2.2
>>
>> I found ActiveMQConnection always hold the ActiveMQTempQueue and should
>> lead
>> to memory leak,
>> especially using massive send/reply through temp queues.
>>
>> I create a ticket here https://issues.apache.org/activemq/browse/AMQ-2716
> 
> There is something I don't get: in the ticket you wrote:
> 1) "the ActiveMQConnections are pooled"? and
> 2) "The 1.5G ActiveMQConnection objects and their referencing objects
> stay in heap old generation and cannot be cleaned by GC."
> 
> If you do really pool your connections, how do you manage to create
> the 1.5 GB of connection objects?
> 
> By the way, why do you use TCP transport for connection to embedded
> ActiveMQ? Why not use VM transport, designed for exactly this purpose?
> 
> Best regards, Ivan
> 
> 

-- 
View this message in context: http://old.nabble.com/ActiveMQConnection-leaks-memory-by-caching-ActiveMQTempQueue-objects-tp28397951p28398408.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Mime
View raw message