activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hans Bausewein (JIRA)" <j...@apache.org>
Subject [jira] Issue Comment Edited: (AMQ-1997) Memory leak in broker - Temporary Queue related (relating to bug AMQ-1790)
Date Thu, 06 Nov 2008 19:46:06 GMT

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

hansb edited comment on AMQ-1997 at 11/6/08 11:44 AM:
---------------------------------------------------------------

Do you either:
- delete the temporary queue when you do not need it anymore
- close the connection

?
Note that connection pooling in Spring or JEE containers will generally avoid closing the
connection.


According to the 1.1 JMS specification temporary queues are not deleted before you do one
of these.

See http://java.sun.com/j2ee/1.4/docs/api/  javax.jms.Session.createTemporaryQueue():

  "Creates a TemporaryQueue object. Its lifetime will be that of the Connection unless it
is deleted earlier."

Or section 4.4.3 "Creating Temporary Destinations" of Java Message Service Specification -
version 1.1
http://java.sun.com/products/jms/docs.html

{quote}
Although sessions are used to create temporary destinations, this is only for
convenience. Their scope is actually the entire connection. Their lifetime is that
of their connection, and any of the connection's sessions is allowed to create a
MessageConsumer for them.

..................................

Since temporary destinations may allocate resources outside the JVM, they
should be deleted if they are no longer needed. They will be automatically
deleted when they are garbage collected or when their connection is closed.
{quote}

BTW: Gary, this is not like implemented now. See AMQ-1979

Hans


      was (Author: hansb):
    Do you either:
- delete the temporary queue when you do not need it anymore
- close the connection

?

According to the 1.1 JMS specification temporary queues are not deleted before you do one
of these.

See http://java.sun.com/j2ee/1.4/docs/api/  javax.jms.Session.createTemporaryQueue():

  "Creates a TemporaryQueue object. Its lifetime will be that of the Connection unless it
is deleted earlier."

Or section 4.4.3 "Creating Temporary Destinations" of Java Message Service Specification -
version 1.1
http://java.sun.com/products/jms/docs.html

{quote}
Although sessions are used to create temporary destinations, this is only for
convenience. Their scope is actually the entire connection. Their lifetime is that
of their connection, and any of the connection's sessions is allowed to create a
MessageConsumer for them.

..................................

Since temporary destinations may allocate resources outside the JVM, they
should be deleted if they are no longer needed. They will be automatically
deleted when they are garbage collected or when their connection is closed.
{quote}

BTW: Gary, this is not like implemented now. See AMQ-1979

Hans

  
>  Memory leak in broker - Temporary Queue related (relating to bug AMQ-1790)
> ---------------------------------------------------------------------------
>
>                 Key: AMQ-1997
>                 URL: https://issues.apache.org/activemq/browse/AMQ-1997
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Broker
>    Affects Versions: 5.2.0
>         Environment: ActiveMQ broker 5.2
> Spring based application with synchronous messages (temp queue based) 
>            Reporter: NNZZ
>
> Hi there,
> I just installed ActiveMQ 5.2, especially for the fix of the memory leak problem in broker,
in version 5.1 (bug AMQ-1790), but the issue is still occurring.
> After instantiating circa 1300 temp queues I am getting the following error: java.lang.OutOfMemoryError
: unable to create new native thread
> Also if I go to the web admin (http://localhost:8161/admin/topics.jsp) I can see a long
list of temp queues that don't go anywhere...
> Would you be able to advise us when the fix for this issue will be released.
> Many thanks
> N

-- 
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