activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rob Davies (JIRA)" <j...@apache.org>
Subject [jira] Resolved: (AMQ-1790) Memory leak in broker - Temporary Queue related (fix proposal included)
Date Wed, 11 Jun 2008 10:56:00 GMT

     [ https://issues.apache.org/activemq/browse/AMQ-1790?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Rob Davies resolved AMQ-1790.
-----------------------------

    Fix Version/s: 5.2.0
       Resolution: Fixed

Fixed by SVN revision 666617

> Memory leak in broker - Temporary Queue related (fix proposal included)
> -----------------------------------------------------------------------
>
>                 Key: AMQ-1790
>                 URL: https://issues.apache.org/activemq/browse/AMQ-1790
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Broker
>    Affects Versions: 5.1.0
>         Environment: ActiveMQ broker 5.1 
> Spring based application with synchronous messages (temp queue based)
>            Reporter: Gregory Mostizky
>            Assignee: Rob Davies
>            Priority: Critical
>             Fix For: 5.2.0
>
>
> ActiveMQ broker leaks memory when using temp queues.
> This is critical for projects that use spring based synchronous messaging because each
message creates & destroys new temp queue,
> however because of the leak they are not completely cleaned up resulting in OutOfMemory
exception.
> First these are the classes that are leaked:
> org.apache.activemq.usage.MemoryUsage
> org.apache.activemq.management.PollCountStatisticImpl
> org.apache.activemq.usage.DefaultUsageCapacity
> Cause:
> org.apache.activemq.broker.region.BaseDestination is a base class for queues and by extension
TempQueues.
> When TempQueue is created it will call BaseDestination constructor which will allocate
some memory usage and statistics objects.
> However, the cleanup operation is missing - when TempQueue is destroyed these resources
are not removed, and because these objects form a tree with the root being the root SystemUsage
object they are never deleted.
> Solution:
> BaseDestination should implement dispose() method - this method is already defined in
Destination interface but not implemented in BaseDestination.
> This method should cleanup all the resources allocated during it's creation. For example,
see Queue.dispose().

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message