You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by "Bhanu (JIRA)" <ji...@apache.org> on 2013/01/23 08:34:14 UTC

[jira] [Created] (AMQ-4267) Huge tx-*.tmp file in the kahadb directory

Bhanu created AMQ-4267:
--------------------------

             Summary: Huge tx-*.tmp file in the kahadb directory
                 Key: AMQ-4267
                 URL: https://issues.apache.org/jira/browse/AMQ-4267
             Project: ActiveMQ
          Issue Type: Bug
          Components: Broker
    Affects Versions: 5.6.0
         Environment: linux
            Reporter: Bhanu


Hi,

While destroying a durable subscription via jconsole, I suddenly saw broker dumping a 7.5 GB tx-1370965-1358923245272.tmp file in the kahadb directory. It subsequently died and on restarting the tmp file got removed. Can you please tell us why that file was created and broker died? We have not seen this before but this happened in production today.

Thanks,
Bhanu

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Re: [jira] [Created] (AMQ-4267) Huge tx-*.tmp file in the kahadb directory

Posted by Sophia Wright <so...@gmail.com>.
So basically this file is getting created, because Producer is using
transactions and has sent messages more than maxTransactionSize before
commit occurs.

and this file will only be created when I am using transactions ? 

Please correct me if I am wrong. 


Thanks





--
View this message in context: http://activemq.2283324.n4.nabble.com/jira-Created-AMQ-4267-Huge-tx-tmp-file-in-the-kahadb-directory-tp4662065p4675449.html
Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.

Re: [jira] [Created] (AMQ-4267) Huge tx-*.tmp file in the kahadb directory

Posted by Timothy Bish <ta...@gmail.com>.
On 12/12/2013 05:32 AM, Sophia Wright wrote:
> Steven has a point...
>
> A message is not send to the broker untill commit occurs, SO how does this
> tx-..tmp file gets created before commit ?
>
> Please explain this issue.. What is the root cause for this file creation...
>
> Thanks,
> Sophia
>
>
>
>
> --
> View this message in context: http://activemq.2283324.n4.nabble.com/jira-Created-AMQ-4267-Huge-tx-tmp-file-in-the-kahadb-directory-tp4662065p4675444.html
> Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.
>
The messages are sent to the broker, just not dispatched until the 
commit occurs, we don't cache them on the client since you have no why 
of knowing how many would be sent so memory issues could occur, just to 
name one reason.

-- 
Tim Bish
Sr Software Engineer | RedHat Inc.
tim.bish@redhat.com | www.fusesource.com | www.redhat.com
skype: tabish121 | twitter: @tabish121
blog: http://timbish.blogspot.com/


Re: [jira] [Created] (AMQ-4267) Huge tx-*.tmp file in the kahadb directory

Posted by Sophia Wright <so...@gmail.com>.
Steven has a point...

A message is not send to the broker untill commit occurs, SO how does this
tx-..tmp file gets created before commit ? 

Please explain this issue.. What is the root cause for this file creation... 

Thanks,
Sophia




--
View this message in context: http://activemq.2283324.n4.nabble.com/jira-Created-AMQ-4267-Huge-tx-tmp-file-in-the-kahadb-directory-tp4662065p4675444.html
Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.

Re: [jira] [Created] (AMQ-4267) Huge tx-*.tmp file in the kahadb directory

Posted by Steven Turner <st...@gmail.com>.
Hey little bit confused about this file...

So according to my understanding, "if we are using transacted session at
producer side, than messages are sent to the broker only after producer
commit the transactions." 
So if a producer is sending the messages and does not commit at all, No
messages will be received by broker"


Now I am confused that How this tx-*.tmp file is getting created. If I am
using transactions of more than 'maxTransactionSize' than this tmp file is
created before commit. But As I was saying previously that messages are not
even received by broker before commit happens..

Please tell me exactly when this file is created ??



--
View this message in context: http://activemq.2283324.n4.nabble.com/jira-Created-AMQ-4267-Huge-tx-tmp-file-in-the-kahadb-directory-tp4662065p4675350.html
Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.

Re: [jira] [Created] (AMQ-4267) Huge tx-*.tmp file in the kahadb directory

Posted by Robert Davies <ra...@gmail.com>.
Looks correct - you can always increase that size by setting the maxKahaDBTxSize System property …

On 22 Oct 2013, at 09:26, Sophia Wright <so...@gmail.com> wrote:

> So basically this file is created when I am using transactions of more than
> 10 mb and got deleted as soon as I commit or rollback the transaction. 
> 
> Please correct me if I am wrong ?
> 
> 
> 
> 
> 
> 
> --
> View this message in context: http://activemq.2283324.n4.nabble.com/jira-Created-AMQ-4267-Huge-tx-tmp-file-in-the-kahadb-directory-tp4662065p4673086.html
> Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.

Rob Davies
-----------------
Red Hat, Inc
Twitter: rajdavies
Blog: http://rajdavies.blogspot.com
ActiveMQ in Action: http://www.manning.com/snyder/


Re: [jira] [Created] (AMQ-4267) Huge tx-*.tmp file in the kahadb directory

Posted by Sophia Wright <so...@gmail.com>.
So basically this file is created when I am using transactions of more than
10 mb and got deleted as soon as I commit or rollback the transaction. 

Please correct me if I am wrong ?






--
View this message in context: http://activemq.2283324.n4.nabble.com/jira-Created-AMQ-4267-Huge-tx-tmp-file-in-the-kahadb-directory-tp4662065p4673086.html
Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.

Re: [jira] [Created] (AMQ-4267) Huge tx-*.tmp file in the kahadb directory

Posted by Gary Tully <ga...@gmail.com>.
peek at https://issues.apache.org/jira/browse/AMQ-3374

On 21 October 2013 15:49, Sophia Wright <so...@gmail.com> wrote:
> Hey,
>
> I am also checking the same issue with my broker. It is creating tx-*.temp
> file using below source code:
>
> activemq-parent-5.8.0-source-release/activemq-parent-5.8.0/activemq-kahadb-store/src/main/java/org/apache/activemq/store/kahadb/disk/page/Transaction.java:
>
> protected File getTempFile() {
>         if (txFile == null) {
>             txFile = new File(getPageFile().getDirectory(),
> IOHelper.toFileSystemSafeName("tx-" + Long.toString(getWriteTransactionId())
> + "-" + Long.toString(System.currentTimeMillis()) + ".tmp"));
>         }
>        return txFile;
>     }
>
> Waiting for someone from activeMQ dev team to reply ?
>
>
>
>
> --
> View this message in context: http://activemq.2283324.n4.nabble.com/jira-Created-AMQ-4267-Huge-tx-tmp-file-in-the-kahadb-directory-tp4662065p4673047.html
> Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.



-- 
http://redhat.com
http://blog.garytully.com

Re: [jira] [Created] (AMQ-4267) Huge tx-*.tmp file in the kahadb directory

Posted by Sophia Wright <so...@gmail.com>.
Hey,

I am also checking the same issue with my broker. It is creating tx-*.temp
file using below source code:

activemq-parent-5.8.0-source-release/activemq-parent-5.8.0/activemq-kahadb-store/src/main/java/org/apache/activemq/store/kahadb/disk/page/Transaction.java:

protected File getTempFile() {
        if (txFile == null) {
            txFile = new File(getPageFile().getDirectory(),
IOHelper.toFileSystemSafeName("tx-" + Long.toString(getWriteTransactionId())
+ "-" + Long.toString(System.currentTimeMillis()) + ".tmp"));
        }
       return txFile;
    }

Waiting for someone from activeMQ dev team to reply ? 




--
View this message in context: http://activemq.2283324.n4.nabble.com/jira-Created-AMQ-4267-Huge-tx-tmp-file-in-the-kahadb-directory-tp4662065p4673047.html
Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.

Re: [jira] [Created] (AMQ-4267) Huge tx-*.tmp file in the kahadb directory

Posted by johnbing <bi...@gmail.com>.
I have also faced same issue many times. It automatically creates this binary
file which is of very huge size in kahadb directory.
Can someone can tell me which code from broker is generating this or in what
cases it happens ?

Thanks,
John



--
View this message in context: http://activemq.2283324.n4.nabble.com/jira-Created-AMQ-4267-Huge-tx-tmp-file-in-the-kahadb-directory-tp4662065p4672828.html
Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.

Re: [jira] [Created] (AMQ-4267) Huge tx-*.tmp file in the kahadb directory

Posted by Steven Turner <st...@gmail.com>.
Hey,
Waiting for someone to respond. 
Please let me know from where this file is created. In what scenario this
happens.

I ran strings command on that binary file it showed me - 
"BID:brokerhost-52209-1380522674218-2:14289212:-1:1:1" repeated
continuously.





--
View this message in context: http://activemq.2283324.n4.nabble.com/jira-Created-AMQ-4267-Huge-tx-tmp-file-in-the-kahadb-directory-tp4662065p4672825.html
Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.

Re: [jira] [Created] (AMQ-4267) Huge tx-*.tmp file in the kahadb directory

Posted by Steven Turner <st...@gmail.com>.
I am using ActiveMQ 5.8.0. I have also seen the same issue in kahadb
directory. Suddenly a huge file named tx-**.tmp appears which is a binary
file of around 7.5 GB. I have to restart and clear the kahadb to get rid of
this file.
Can someone from ActiveMQ development team will help me here. I am not able
to figure out from where this is coming.


Thanks,
Steven



--
View this message in context: http://activemq.2283324.n4.nabble.com/jira-Created-AMQ-4267-Huge-tx-tmp-file-in-the-kahadb-directory-tp4662065p4672790.html
Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.