You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@activemq.apache.org by "Rakesh Chandru (Jira)" <ji...@apache.org> on 2019/08/22 15:25:00 UTC
[jira] [Comment Edited] (ARTEMIS-2460) Open file descriptors leak
for large messages
[ https://issues.apache.org/jira/browse/ARTEMIS-2460?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16913417#comment-16913417 ]
Rakesh Chandru edited comment on ARTEMIS-2460 at 8/22/19 3:25 PM:
------------------------------------------------------------------
We had this problem from before. I checked for this problem against 2.6.4.7 and 2.9.0 and could notice the leak with both the versions. Yes, I understand they are stored as files on disk. The references to the files are still present even after the messages are sent and the files are deleted.
Unfortunately, I don't have a test case or steps to reproduce this problem. But, fixed this problem by closing the file, if open, during the delivery of the message.
{code:java}
class DecodingContext implements LargeBodyEncoder {
private SequentialFile cFile;
@Override
public void open() throws ActiveMQException {
try {
if (cFile != null && cFile.isOpen()) {
cFile.close(false);
}
cFile = file.cloneFile();
if(file.isOpen()) {
file.close();
}
cFile.open();
} catch (Exception e) {
throw new ActiveMQException(ActiveMQExceptionType.INTERNAL_ERROR, e.getMessage(), e);
}
}{code}
was (Author: rakesh11rc):
We had this problem from before. I checked for this problem against 2.6.4.7 and 2.9.0 and could notice the leak with both the versions. Yes, I understand they are stored as files on disk. The references to the files are still present even after the messages are sent and the files are deleted.
Unfortunately, I don't have a test case or steps to reproduce this problem. But, fixed this problem by closing the file if open during the delivery of the message.
{code:java}
class DecodingContext implements LargeBodyEncoder {
private SequentialFile cFile;
@Override
public void open() throws ActiveMQException {
try {
if (cFile != null && cFile.isOpen()) {
cFile.close(false);
}
cFile = file.cloneFile();
if(file.isOpen()) {
file.close();
}
cFile.open();
} catch (Exception e) {
throw new ActiveMQException(ActiveMQExceptionType.INTERNAL_ERROR, e.getMessage(), e);
}
}{code}
> Open file descriptors leak for large messages
> ---------------------------------------------
>
> Key: ARTEMIS-2460
> URL: https://issues.apache.org/jira/browse/ARTEMIS-2460
> Project: ActiveMQ Artemis
> Issue Type: Bug
> Components: STOMP
> Affects Versions: 2.9.0
> Reporter: Rakesh Chandru
> Assignee: Justin Bertram
> Priority: Major
>
>
> There is a significant increase in case of open file descriptors when publishing large messages. This behaviour is also see with the latest 2.9.0 version.
> {code:java}
> java 38082 root 9486u REG 8,4 909757 19146486 /xxx/data/large-messages/31297137237.msg (deleted)
> java 38082 root 9489u REG 8,4 605189 19146488 /xxx/data/large-messages/31297137344.msg (deleted){code}
> The reference is kept to the deleted large message file
> Below is the log trace.
> {noformat}
> 2019-07-23 05:00:10 TRACE [org.apache.activemq.artemis.core.persistence.impl.journal.JournalStorageManager] Opening large message file(openFile-512) with message-id=19,826,804,644
> 2019-07-23 05:00:10 TRACE [org.apache.activemq.artemis.core.persistence.impl.journal.JournalStorageManager] Closing large message file(releaseResources-341) with message-id=19,826,804,644
> 2019-07-23 05:03:51 TRACE [org.apache.activemq.artemis.core.persistence.impl.journal.JournalStorageManager] Opening large message file(openFile-512) with message-id=19,826,804,644
> 2019-07-23 05:03:51 TRACE [org.apache.activemq.artemis.core.persistence.impl.journal.JournalStorageManager] Opening decoding context file for large message with message-id=19,826,804,644
> 2019-07-23 05:03:51 TRACE [org.apache.activemq.artemis.core.persistence.impl.journal.JournalStorageManager] Closing decoding context file for large message with message-id=19,826,804,644
> 2019-07-23 05:03:52 TRACE [org.apache.activemq.artemis.core.persistence.impl.journal.JournalStorageManager] Opening large message file(openFile-512) with message-id=19,826,804,644
> 2019-07-23 05:03:52 TRACE [org.apache.activemq.artemis.core.persistence.impl.journal.JournalStorageManager] Closing large message file(releaseResources-341) with message-id=19,826,804,644
> {noformat}
--
This message was sent by Atlassian Jira
(v8.3.2#803003)