You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by "Hariharan (JIRA)" <ji...@apache.org> on 2011/07/29 11:53:10 UTC

[jira] [Created] (AMQ-3424) AMQ data dir not cleaning up even after messages getting consumed.

AMQ data dir not cleaning up even after messages getting consumed.
------------------------------------------------------------------

                 Key: AMQ-3424
                 URL: https://issues.apache.org/jira/browse/AMQ-3424
             Project: ActiveMQ
          Issue Type: Bug
          Components: Message Store
            Reporter: Hariharan


Hi,
We are using ActiveMQ 5.3 (in UNIX) and use both queues and topics (durable and non-durable).
The messages are published by the publishers in persistent delivery and auto acknowledge mode.

I can see that the consumers are actively able to consume the messages. 

However, even after the messages getting consumed successfully, the data dir size is not coming down. 

I tried :
 1. Using both amqPersistenceAdapter and kahaDB.
 2. Upgrading the AMQ to 5.5

But none of them is bringing down its size.

snapshot:
{code:xml} 
*After starting the broker.*

du -h activemq_data_kahadb ; ls -l /activemq_data_kahadb
48K     /activemq_data_kahadb
total 44
-rw-rw-r-- 1 manih manih 9961472 Jul 29 05:06 db-1.log
-rw-rw-r-- 1 manih manih   12288 Jul 29 05:06 db.data
-rw-rw-r-- 1 manih manih   12304 Jul 29 05:06 db.redo
-rw-rw-r-- 1 manih manih       0 Jul 29 05:04 lock

*After messages getting delivered.*

du -h /activemq_data_kahadb ; ls -l /activemq_data_kahadb
1.7M    /activemq_data_kahadb
total 1652
-rw-rw-r-- 1 manih manih 9961472 Jul 29 05:24 db-1.log
-rw-rw-r-- 1 manih manih  364544 Jul 29 05:24 db.data
-rw-rw-r-- 1 manih manih  332416 Jul 29 05:24 db.redo
-rw-rw-r-- 1 manih manih       0 Jul 29 05:04 lock
{code} 

Here are my config details:
{code:xml} 
<amq:persistenceAdapter>
    <amq:kahaDB directory="activemq_data_kahadb" journalMaxFileLength="10mb"/>
</amq:persistenceAdapter>

<amq:systemUsage>
    <amq:systemUsage>
        <amq:memoryUsage>
            <amq:memoryUsage limit="20 mb"/>
        </amq:memoryUsage>
        <amq:storeUsage>
            <amq:storeUsage limit="1 gb"/>
        </amq:storeUsage>
        <amq:tempUsage>
            <amq:tempUsage limit="100 mb"/>
         </amq:tempUsage>
    </amq:systemUsage>
</amq:systemUsage>
{code} 

I do understand that the messages are persisted until consumed by the consumers, but after that shouldn't the file size be coming down?
Please let me know if there are any config changes that I need to do to get this working fine.

Thanks in advance
Hari

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (AMQ-3424) AMQ data dir not cleaning up even after messages getting consumed.

Posted by "Hariharan (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AMQ-3424?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13076015#comment-13076015 ] 

Hariharan commented on AMQ-3424:
--------------------------------

Thanks James. I'll try this out.

> AMQ data dir not cleaning up even after messages getting consumed.
> ------------------------------------------------------------------
>
>                 Key: AMQ-3424
>                 URL: https://issues.apache.org/jira/browse/AMQ-3424
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Message Store
>            Reporter: Hariharan
>
> Hi,
> We are using ActiveMQ 5.3 (in UNIX) and use both queues and topics (durable and non-durable).
> The messages are published by the publishers in persistent delivery and auto acknowledge mode.
> I can see that the consumers are actively able to consume the messages. 
> However, even after the messages getting consumed successfully, the data dir size is not coming down. 
> I tried :
>  1. Using both amqPersistenceAdapter and kahaDB.
>  2. Upgrading the AMQ to 5.5
> But none of them is bringing down its size.
> snapshot:
> {code:xml} 
> *After starting the broker.*
> du -h activemq_data_kahadb ; ls -l /activemq_data_kahadb
> 48K     /activemq_data_kahadb
> total 44
> -rw-rw-r-- 1 manih manih 9961472 Jul 29 05:06 db-1.log
> -rw-rw-r-- 1 manih manih   12288 Jul 29 05:06 db.data
> -rw-rw-r-- 1 manih manih   12304 Jul 29 05:06 db.redo
> -rw-rw-r-- 1 manih manih       0 Jul 29 05:04 lock
> *After messages getting delivered.*
> du -h /activemq_data_kahadb ; ls -l /activemq_data_kahadb
> 1.7M    /activemq_data_kahadb
> total 1652
> -rw-rw-r-- 1 manih manih 9961472 Jul 29 05:24 db-1.log
> -rw-rw-r-- 1 manih manih  364544 Jul 29 05:24 db.data
> -rw-rw-r-- 1 manih manih  332416 Jul 29 05:24 db.redo
> -rw-rw-r-- 1 manih manih       0 Jul 29 05:04 lock
> {code} 
> Here are my config details:
> {code:xml} 
> <amq:persistenceAdapter>
>     <amq:kahaDB directory="activemq_data_kahadb" journalMaxFileLength="10mb"/>
> </amq:persistenceAdapter>
> <amq:systemUsage>
>     <amq:systemUsage>
>         <amq:memoryUsage>
>             <amq:memoryUsage limit="20 mb"/>
>         </amq:memoryUsage>
>         <amq:storeUsage>
>             <amq:storeUsage limit="1 gb"/>
>         </amq:storeUsage>
>         <amq:tempUsage>
>             <amq:tempUsage limit="100 mb"/>
>          </amq:tempUsage>
>     </amq:systemUsage>
> </amq:systemUsage>
> {code} 
> I do understand that the messages are persisted until consumed by the consumers, but after that shouldn't the file size be coming down?
> Please let me know if there are any config changes that I need to do to get this working fine.
> Thanks in advance
> Hari

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (AMQ-3424) AMQ data dir not cleaning up even after messages getting consumed.

Posted by "James Green (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AMQ-3424?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13073468#comment-13073468 ] 

James Green commented on AMQ-3424:
----------------------------------

This was a known issue that was fixed in the 5.5 release (and verified by many reporting it). The only other reason I have found for log files not to be removed is stale durable subscribers.

To isolate the problem you can switch on tracing of the vacuuming process. This should verify whether kahadb "knows" about the logs you can see and if so, whether it is making a conscious decision not to delete them.

Read http://activemq.2283324.n4.nabble.com/KahaDB-storage-size-grows-despite-almost-no-pending-messages-td3573894.html for more information.

> AMQ data dir not cleaning up even after messages getting consumed.
> ------------------------------------------------------------------
>
>                 Key: AMQ-3424
>                 URL: https://issues.apache.org/jira/browse/AMQ-3424
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Message Store
>            Reporter: Hariharan
>
> Hi,
> We are using ActiveMQ 5.3 (in UNIX) and use both queues and topics (durable and non-durable).
> The messages are published by the publishers in persistent delivery and auto acknowledge mode.
> I can see that the consumers are actively able to consume the messages. 
> However, even after the messages getting consumed successfully, the data dir size is not coming down. 
> I tried :
>  1. Using both amqPersistenceAdapter and kahaDB.
>  2. Upgrading the AMQ to 5.5
> But none of them is bringing down its size.
> snapshot:
> {code:xml} 
> *After starting the broker.*
> du -h activemq_data_kahadb ; ls -l /activemq_data_kahadb
> 48K     /activemq_data_kahadb
> total 44
> -rw-rw-r-- 1 manih manih 9961472 Jul 29 05:06 db-1.log
> -rw-rw-r-- 1 manih manih   12288 Jul 29 05:06 db.data
> -rw-rw-r-- 1 manih manih   12304 Jul 29 05:06 db.redo
> -rw-rw-r-- 1 manih manih       0 Jul 29 05:04 lock
> *After messages getting delivered.*
> du -h /activemq_data_kahadb ; ls -l /activemq_data_kahadb
> 1.7M    /activemq_data_kahadb
> total 1652
> -rw-rw-r-- 1 manih manih 9961472 Jul 29 05:24 db-1.log
> -rw-rw-r-- 1 manih manih  364544 Jul 29 05:24 db.data
> -rw-rw-r-- 1 manih manih  332416 Jul 29 05:24 db.redo
> -rw-rw-r-- 1 manih manih       0 Jul 29 05:04 lock
> {code} 
> Here are my config details:
> {code:xml} 
> <amq:persistenceAdapter>
>     <amq:kahaDB directory="activemq_data_kahadb" journalMaxFileLength="10mb"/>
> </amq:persistenceAdapter>
> <amq:systemUsage>
>     <amq:systemUsage>
>         <amq:memoryUsage>
>             <amq:memoryUsage limit="20 mb"/>
>         </amq:memoryUsage>
>         <amq:storeUsage>
>             <amq:storeUsage limit="1 gb"/>
>         </amq:storeUsage>
>         <amq:tempUsage>
>             <amq:tempUsage limit="100 mb"/>
>          </amq:tempUsage>
>     </amq:systemUsage>
> </amq:systemUsage>
> {code} 
> I do understand that the messages are persisted until consumed by the consumers, but after that shouldn't the file size be coming down?
> Please let me know if there are any config changes that I need to do to get this working fine.
> Thanks in advance
> Hari

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Closed] (AMQ-3424) AMQ data dir not cleaning up even after messages getting consumed.

Posted by "Hariharan (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AMQ-3424?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Hariharan closed AMQ-3424.
--------------------------

    Resolution: Not A Problem

> AMQ data dir not cleaning up even after messages getting consumed.
> ------------------------------------------------------------------
>
>                 Key: AMQ-3424
>                 URL: https://issues.apache.org/jira/browse/AMQ-3424
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Message Store
>            Reporter: Hariharan
>         Attachments: TestFile.xml, TestListener.java, TestMessageProducer.java
>
>
> Hi,
> We are using ActiveMQ 5.3 (in UNIX) and use both queues and topics (durable and non-durable).
> The messages are published by the publishers in persistent delivery and auto acknowledge mode.
> I can see that the consumers are actively able to consume the messages. 
> However, even after the messages getting consumed successfully, the data dir size is not coming down. 
> I tried :
>  1. Using both amqPersistenceAdapter and kahaDB.
>  2. Upgrading the AMQ to 5.5
> But none of them is bringing down its size.
> snapshot:
> {code:xml} 
> *After starting the broker.*
> du -h activemq_data_kahadb ; ls -l /activemq_data_kahadb
> 48K     /activemq_data_kahadb
> total 44
> -rw-rw-r-- 1 manih manih 9961472 Jul 29 05:06 db-1.log
> -rw-rw-r-- 1 manih manih   12288 Jul 29 05:06 db.data
> -rw-rw-r-- 1 manih manih   12304 Jul 29 05:06 db.redo
> -rw-rw-r-- 1 manih manih       0 Jul 29 05:04 lock
> *After messages getting delivered.*
> du -h /activemq_data_kahadb ; ls -l /activemq_data_kahadb
> 1.7M    /activemq_data_kahadb
> total 1652
> -rw-rw-r-- 1 manih manih 9961472 Jul 29 05:24 db-1.log
> -rw-rw-r-- 1 manih manih  364544 Jul 29 05:24 db.data
> -rw-rw-r-- 1 manih manih  332416 Jul 29 05:24 db.redo
> -rw-rw-r-- 1 manih manih       0 Jul 29 05:04 lock
> {code} 
> Here are my config details:
> {code:xml} 
> <amq:persistenceAdapter>
>     <amq:kahaDB directory="activemq_data_kahadb" journalMaxFileLength="10mb"/>
> </amq:persistenceAdapter>
> <amq:systemUsage>
>     <amq:systemUsage>
>         <amq:memoryUsage>
>             <amq:memoryUsage limit="20 mb"/>
>         </amq:memoryUsage>
>         <amq:storeUsage>
>             <amq:storeUsage limit="1 gb"/>
>         </amq:storeUsage>
>         <amq:tempUsage>
>             <amq:tempUsage limit="100 mb"/>
>          </amq:tempUsage>
>     </amq:systemUsage>
> </amq:systemUsage>
> {code} 
> I do understand that the messages are persisted until consumed by the consumers, but after that shouldn't the file size be coming down?
> Please let me know if there are any config changes that I need to do to get this working fine.
> Thanks in advance
> Hari

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (AMQ-3424) AMQ data dir not cleaning up even after messages getting consumed.

Posted by "Hariharan (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AMQ-3424?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13076170#comment-13076170 ] 

Hariharan commented on AMQ-3424:
--------------------------------

I tried using the logger and this is all I see getting logged in kahadb.log.

{code:xml}
 2011-08-02 00:45:24,601 [eckpoint Worker] TRACE MessageDatabase                - Last update: 1:144374, full gc candidates set: [1]
 2011-08-02 00:45:24,601 [eckpoint Worker] TRACE MessageDatabase                - gc candidates after first tx:1:144374, []
 2011-08-02 00:45:24,601 [eckpoint Worker] TRACE MessageDatabase                - gc candidates: []
 2011-08-02 00:45:24,601 [eckpoint Worker] DEBUG MessageDatabase                - Checkpoint done.
 2011-08-02 00:45:29,602 [eckpoint Worker] DEBUG MessageDatabase                - Checkpoint started.
 2011-08-02 00:45:29,604 [eckpoint Worker] DEBUG MessageDatabase                - Checkpoint done.
 2011-08-02 00:45:34,605 [eckpoint Worker] DEBUG MessageDatabase                - Checkpoint started.
 2011-08-02 00:45:34,607 [eckpoint Worker] DEBUG MessageDatabase                - Checkpoint done.
 2011-08-02 00:45:39,607 [eckpoint Worker] DEBUG MessageDatabase                - Checkpoint started.
 2011-08-02 00:45:39,611 [eckpoint Worker] DEBUG MessageDatabase                - Checkpoint done.
 2011-08-02 00:45:44,611 [eckpoint Worker] DEBUG MessageDatabase                - Checkpoint started.
 2011-08-02 00:45:44,615 [eckpoint Worker] DEBUG MessageDatabase                - Checkpoint done.
 2011-08-02 00:45:49,615 [eckpoint Worker] DEBUG MessageDatabase                - Checkpoint started.
 2011-08-02 00:45:49,619 [eckpoint Worker] DEBUG MessageDatabase                - Checkpoint done.
 2011-08-02 00:45:54,620 [eckpoint Worker] DEBUG MessageDatabase                - Checkpoint started.
 2011-08-02 00:45:54,623 [eckpoint Worker] TRACE MessageDatabase                - Last update: 1:155030, full gc candidates set: [1]
 2011-08-02 00:45:54,623 [eckpoint Worker] TRACE MessageDatabase                - gc candidates after first tx:1:155030, []
 2011-08-02 00:45:54,623 [eckpoint Worker] TRACE MessageDatabase                - gc candidates: []
{code}

So I tried recreating this scenario using test cases. Attached are the test cases of producer and consumer.
Below is the snapshot of the data dir.

{code:xml}
> du -h /activemq_data_kahadb/ ; ls -l /activemq_data_kahadb/
864K    /activemq_data_kahadb/
total 868
-rw-rw-r-- 1 manih manih 9961472 Aug  2 08:26 db-1.log
-rw-rw-r-- 1 manih manih  405504 Aug  2 08:26 db.data
-rw-rw-r-- 1 manih manih  352936 Aug  2 08:26 db.redo
-rw-rw-r-- 1 manih manih       0 Aug  2 08:24 lock

> du -h /activemq_data_kahadb/ ; ls -l /activemq_data_kahadb/
1.1M    /activemq_data_kahadb/
total 1088
-rw-rw-r-- 1 manih manih 9961472 Aug  2 08:28 db-1.log
-rw-rw-r-- 1 manih manih  405504 Aug  2 08:28 db.data
-rw-rw-r-- 1 manih manih  352936 Aug  2 08:28 db.redo
-rw-rw-r-- 1 manih manih       0 Aug  2 08:24 lock

> du -h /activemq_data_kahadb/ ; ls -l /activemq_data_kahadb/
1.3M    /activemq_data_kahadb/
total 1284
-rw-rw-r-- 1 manih manih 9961472 Aug  2 08:29 db-1.log
-rw-rw-r-- 1 manih manih  405504 Aug  2 08:29 db.data
-rw-rw-r-- 1 manih manih  352936 Aug  2 08:29 db.redo
-rw-rw-r-- 1 manih manih       0 Aug  2 08:24 lock
{code}

What I see here is that the file sizes are remaining same while the dir size keeps growing. 

Can you please help me understand where the data is going? 
Please let me know if there is any thing wrong in what am trying to do.

> AMQ data dir not cleaning up even after messages getting consumed.
> ------------------------------------------------------------------
>
>                 Key: AMQ-3424
>                 URL: https://issues.apache.org/jira/browse/AMQ-3424
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Message Store
>            Reporter: Hariharan
>
> Hi,
> We are using ActiveMQ 5.3 (in UNIX) and use both queues and topics (durable and non-durable).
> The messages are published by the publishers in persistent delivery and auto acknowledge mode.
> I can see that the consumers are actively able to consume the messages. 
> However, even after the messages getting consumed successfully, the data dir size is not coming down. 
> I tried :
>  1. Using both amqPersistenceAdapter and kahaDB.
>  2. Upgrading the AMQ to 5.5
> But none of them is bringing down its size.
> snapshot:
> {code:xml} 
> *After starting the broker.*
> du -h activemq_data_kahadb ; ls -l /activemq_data_kahadb
> 48K     /activemq_data_kahadb
> total 44
> -rw-rw-r-- 1 manih manih 9961472 Jul 29 05:06 db-1.log
> -rw-rw-r-- 1 manih manih   12288 Jul 29 05:06 db.data
> -rw-rw-r-- 1 manih manih   12304 Jul 29 05:06 db.redo
> -rw-rw-r-- 1 manih manih       0 Jul 29 05:04 lock
> *After messages getting delivered.*
> du -h /activemq_data_kahadb ; ls -l /activemq_data_kahadb
> 1.7M    /activemq_data_kahadb
> total 1652
> -rw-rw-r-- 1 manih manih 9961472 Jul 29 05:24 db-1.log
> -rw-rw-r-- 1 manih manih  364544 Jul 29 05:24 db.data
> -rw-rw-r-- 1 manih manih  332416 Jul 29 05:24 db.redo
> -rw-rw-r-- 1 manih manih       0 Jul 29 05:04 lock
> {code} 
> Here are my config details:
> {code:xml} 
> <amq:persistenceAdapter>
>     <amq:kahaDB directory="activemq_data_kahadb" journalMaxFileLength="10mb"/>
> </amq:persistenceAdapter>
> <amq:systemUsage>
>     <amq:systemUsage>
>         <amq:memoryUsage>
>             <amq:memoryUsage limit="20 mb"/>
>         </amq:memoryUsage>
>         <amq:storeUsage>
>             <amq:storeUsage limit="1 gb"/>
>         </amq:storeUsage>
>         <amq:tempUsage>
>             <amq:tempUsage limit="100 mb"/>
>          </amq:tempUsage>
>     </amq:systemUsage>
> </amq:systemUsage>
> {code} 
> I do understand that the messages are persisted until consumed by the consumers, but after that shouldn't the file size be coming down?
> Please let me know if there are any config changes that I need to do to get this working fine.
> Thanks in advance
> Hari

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (AMQ-3424) AMQ data dir not cleaning up even after messages getting consumed.

Posted by "Hariharan (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AMQ-3424?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13073466#comment-13073466 ] 

Hariharan commented on AMQ-3424:
--------------------------------

Hi,
The directory size is continuously growing in production. Can someone please let me know on this.

Regards
Hari

> AMQ data dir not cleaning up even after messages getting consumed.
> ------------------------------------------------------------------
>
>                 Key: AMQ-3424
>                 URL: https://issues.apache.org/jira/browse/AMQ-3424
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Message Store
>            Reporter: Hariharan
>
> Hi,
> We are using ActiveMQ 5.3 (in UNIX) and use both queues and topics (durable and non-durable).
> The messages are published by the publishers in persistent delivery and auto acknowledge mode.
> I can see that the consumers are actively able to consume the messages. 
> However, even after the messages getting consumed successfully, the data dir size is not coming down. 
> I tried :
>  1. Using both amqPersistenceAdapter and kahaDB.
>  2. Upgrading the AMQ to 5.5
> But none of them is bringing down its size.
> snapshot:
> {code:xml} 
> *After starting the broker.*
> du -h activemq_data_kahadb ; ls -l /activemq_data_kahadb
> 48K     /activemq_data_kahadb
> total 44
> -rw-rw-r-- 1 manih manih 9961472 Jul 29 05:06 db-1.log
> -rw-rw-r-- 1 manih manih   12288 Jul 29 05:06 db.data
> -rw-rw-r-- 1 manih manih   12304 Jul 29 05:06 db.redo
> -rw-rw-r-- 1 manih manih       0 Jul 29 05:04 lock
> *After messages getting delivered.*
> du -h /activemq_data_kahadb ; ls -l /activemq_data_kahadb
> 1.7M    /activemq_data_kahadb
> total 1652
> -rw-rw-r-- 1 manih manih 9961472 Jul 29 05:24 db-1.log
> -rw-rw-r-- 1 manih manih  364544 Jul 29 05:24 db.data
> -rw-rw-r-- 1 manih manih  332416 Jul 29 05:24 db.redo
> -rw-rw-r-- 1 manih manih       0 Jul 29 05:04 lock
> {code} 
> Here are my config details:
> {code:xml} 
> <amq:persistenceAdapter>
>     <amq:kahaDB directory="activemq_data_kahadb" journalMaxFileLength="10mb"/>
> </amq:persistenceAdapter>
> <amq:systemUsage>
>     <amq:systemUsage>
>         <amq:memoryUsage>
>             <amq:memoryUsage limit="20 mb"/>
>         </amq:memoryUsage>
>         <amq:storeUsage>
>             <amq:storeUsage limit="1 gb"/>
>         </amq:storeUsage>
>         <amq:tempUsage>
>             <amq:tempUsage limit="100 mb"/>
>          </amq:tempUsage>
>     </amq:systemUsage>
> </amq:systemUsage>
> {code} 
> I do understand that the messages are persisted until consumed by the consumers, but after that shouldn't the file size be coming down?
> Please let me know if there are any config changes that I need to do to get this working fine.
> Thanks in advance
> Hari

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (AMQ-3424) AMQ data dir not cleaning up even after messages getting consumed.

Posted by "Hariharan (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AMQ-3424?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Hariharan updated AMQ-3424:
---------------------------

    Attachment: TestFile.xml
                TestMessageProducer.java
                TestListener.java

Attaching the test cases.

> AMQ data dir not cleaning up even after messages getting consumed.
> ------------------------------------------------------------------
>
>                 Key: AMQ-3424
>                 URL: https://issues.apache.org/jira/browse/AMQ-3424
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Message Store
>            Reporter: Hariharan
>         Attachments: TestFile.xml, TestListener.java, TestMessageProducer.java
>
>
> Hi,
> We are using ActiveMQ 5.3 (in UNIX) and use both queues and topics (durable and non-durable).
> The messages are published by the publishers in persistent delivery and auto acknowledge mode.
> I can see that the consumers are actively able to consume the messages. 
> However, even after the messages getting consumed successfully, the data dir size is not coming down. 
> I tried :
>  1. Using both amqPersistenceAdapter and kahaDB.
>  2. Upgrading the AMQ to 5.5
> But none of them is bringing down its size.
> snapshot:
> {code:xml} 
> *After starting the broker.*
> du -h activemq_data_kahadb ; ls -l /activemq_data_kahadb
> 48K     /activemq_data_kahadb
> total 44
> -rw-rw-r-- 1 manih manih 9961472 Jul 29 05:06 db-1.log
> -rw-rw-r-- 1 manih manih   12288 Jul 29 05:06 db.data
> -rw-rw-r-- 1 manih manih   12304 Jul 29 05:06 db.redo
> -rw-rw-r-- 1 manih manih       0 Jul 29 05:04 lock
> *After messages getting delivered.*
> du -h /activemq_data_kahadb ; ls -l /activemq_data_kahadb
> 1.7M    /activemq_data_kahadb
> total 1652
> -rw-rw-r-- 1 manih manih 9961472 Jul 29 05:24 db-1.log
> -rw-rw-r-- 1 manih manih  364544 Jul 29 05:24 db.data
> -rw-rw-r-- 1 manih manih  332416 Jul 29 05:24 db.redo
> -rw-rw-r-- 1 manih manih       0 Jul 29 05:04 lock
> {code} 
> Here are my config details:
> {code:xml} 
> <amq:persistenceAdapter>
>     <amq:kahaDB directory="activemq_data_kahadb" journalMaxFileLength="10mb"/>
> </amq:persistenceAdapter>
> <amq:systemUsage>
>     <amq:systemUsage>
>         <amq:memoryUsage>
>             <amq:memoryUsage limit="20 mb"/>
>         </amq:memoryUsage>
>         <amq:storeUsage>
>             <amq:storeUsage limit="1 gb"/>
>         </amq:storeUsage>
>         <amq:tempUsage>
>             <amq:tempUsage limit="100 mb"/>
>          </amq:tempUsage>
>     </amq:systemUsage>
> </amq:systemUsage>
> {code} 
> I do understand that the messages are persisted until consumed by the consumers, but after that shouldn't the file size be coming down?
> Please let me know if there are any config changes that I need to do to get this working fine.
> Thanks in advance
> Hari

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (AMQ-3424) AMQ data dir not cleaning up even after messages getting consumed.

Posted by "Hariharan (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AMQ-3424?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13076257#comment-13076257 ] 

Hariharan commented on AMQ-3424:
--------------------------------

The files were not getting deleted as they had not reached the journalMaxFileLength I had specified. I tried the test cases with a smaller value and it worked. 

5.5 is working just fine. Closing this issue.

> AMQ data dir not cleaning up even after messages getting consumed.
> ------------------------------------------------------------------
>
>                 Key: AMQ-3424
>                 URL: https://issues.apache.org/jira/browse/AMQ-3424
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Message Store
>            Reporter: Hariharan
>         Attachments: TestFile.xml, TestListener.java, TestMessageProducer.java
>
>
> Hi,
> We are using ActiveMQ 5.3 (in UNIX) and use both queues and topics (durable and non-durable).
> The messages are published by the publishers in persistent delivery and auto acknowledge mode.
> I can see that the consumers are actively able to consume the messages. 
> However, even after the messages getting consumed successfully, the data dir size is not coming down. 
> I tried :
>  1. Using both amqPersistenceAdapter and kahaDB.
>  2. Upgrading the AMQ to 5.5
> But none of them is bringing down its size.
> snapshot:
> {code:xml} 
> *After starting the broker.*
> du -h activemq_data_kahadb ; ls -l /activemq_data_kahadb
> 48K     /activemq_data_kahadb
> total 44
> -rw-rw-r-- 1 manih manih 9961472 Jul 29 05:06 db-1.log
> -rw-rw-r-- 1 manih manih   12288 Jul 29 05:06 db.data
> -rw-rw-r-- 1 manih manih   12304 Jul 29 05:06 db.redo
> -rw-rw-r-- 1 manih manih       0 Jul 29 05:04 lock
> *After messages getting delivered.*
> du -h /activemq_data_kahadb ; ls -l /activemq_data_kahadb
> 1.7M    /activemq_data_kahadb
> total 1652
> -rw-rw-r-- 1 manih manih 9961472 Jul 29 05:24 db-1.log
> -rw-rw-r-- 1 manih manih  364544 Jul 29 05:24 db.data
> -rw-rw-r-- 1 manih manih  332416 Jul 29 05:24 db.redo
> -rw-rw-r-- 1 manih manih       0 Jul 29 05:04 lock
> {code} 
> Here are my config details:
> {code:xml} 
> <amq:persistenceAdapter>
>     <amq:kahaDB directory="activemq_data_kahadb" journalMaxFileLength="10mb"/>
> </amq:persistenceAdapter>
> <amq:systemUsage>
>     <amq:systemUsage>
>         <amq:memoryUsage>
>             <amq:memoryUsage limit="20 mb"/>
>         </amq:memoryUsage>
>         <amq:storeUsage>
>             <amq:storeUsage limit="1 gb"/>
>         </amq:storeUsage>
>         <amq:tempUsage>
>             <amq:tempUsage limit="100 mb"/>
>          </amq:tempUsage>
>     </amq:systemUsage>
> </amq:systemUsage>
> {code} 
> I do understand that the messages are persisted until consumed by the consumers, but after that shouldn't the file size be coming down?
> Please let me know if there are any config changes that I need to do to get this working fine.
> Thanks in advance
> Hari

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira