You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by Rakesh Athuru <Ra...@planonsoftware.com.INVALID> on 2024/05/09 08:55:16 UTC
Queue load resulting OutOfMemory exception
Hi,
I am using JBoss Wildfly server with ActiveMQ (Artemis) configured.
I have a queue with persistency (to MS SQLServer DB) enabled, and when the queue contains lot of messages (persisted to DB), upon restart of the Wildfly server, queue loading results OutOfMemory error.
When I looked at heapdump, I see heap contains org.apache.activemq.artemis.core.journal.RecordInfo objects and these are being created from "org.apache.activemq.artemis.jdbc.store.journal.JDBCJournalImpl#load(org.apache.activemq.artemis.core.journal.LoaderCallback)".
Also I see query used by 'org.apache.activemq.artemis.jdbc.store.journal.JDBCJournalImpl' to select messages, it queries complete table, this means if the table has 100000 records all of them are read at once and for each row RecordInfo object will be created.
Is there a configuration which influences this usecase and through which I can avoid OutOfMemory error ?
Regards,
Rakesh.A
Re: Queue load resulting OutOfMemory exception
Posted by Rakesh Athuru <Ra...@planonsoftware.com.INVALID>.
Hi,
I think I found it, its https://issues.apache.org/jira/browse/ARTEMIS-4401 and https://github.com/apache/activemq-artemis/pull/4591/files
Please let me know if these are not the ones.
Regards,
Rakesh.A
________________________________
From: Rakesh Athuru <Ra...@planonsoftware.com.INVALID>
Sent: Tuesday, May 14, 2024 10:17 AM
To: users@activemq.apache.org <us...@activemq.apache.org>
Subject: Re: Queue load resulting OutOfMemory exception
[You don't often get email from rakesh.athuru@planonsoftware.com.invalid. Learn why this is important at https://aka.ms/LearnAboutSenderIdentification ]
Hi,
Could you please share JIRA number or pull request or some reference to the improvement you did to JDBC journal implementation, that I can go through.
Usage via Wildfly indeed makes things difficult, due to it having different release cycle.
Regards,
Rakesh.A
________________________________
From: Clebert Suconic <cl...@gmail.com>
Sent: Monday, May 13, 2024 6:04 AM
To: users@activemq.apache.org <us...@activemq.apache.org>
Subject: Re: Queue load resulting OutOfMemory exception
[You don't often get email from clebert.suconic@gmail.com. Learn why this is important at https://aka.ms/LearnAboutSenderIdentification ]
on more recent versions of Artemis, I have improved paging with JDBC.
I would suggest you keep more data on paging by setting an
address-setting#max-size-bytes. However Wildfly is a few versions
behind.
Perhaps you could use Artemis standalone and consume remote from
Wildfly. Artemis is on a faster release cadence than Wildfly. As you
can imagine Wildfly being a bigger project it takes more times for
them to consume Artemis. Especially that they have stringent
requirements on their testsuite.
Emmanuel Hugonet is doing a great job maintaining the compatibility
but it's not easy to keep Wildfly consuming the latest version of
artemis all the time.
On Thu, May 9, 2024 at 9:41 AM Justin Bertram <jb...@apache.org> wrote:
>
> At the moment there is no broker-specific configuration that would impact
> this use-case. I recommend you simply give the JVM more memory to deal with
> the size of the JDBC ResultSet.
>
>
> Justin
>
> On Thu, May 9, 2024 at 3:55 AM Rakesh Athuru
> <Ra...@planonsoftware.com.invalid> wrote:
>
> > Hi,
> >
> > I am using JBoss Wildfly server with ActiveMQ (Artemis) configured.
> > I have a queue with persistency (to MS SQLServer DB) enabled, and when the
> > queue contains lot of messages (persisted to DB), upon restart of the
> > Wildfly server, queue loading results OutOfMemory error.
> > When I looked at heapdump, I see heap contains
> > org.apache.activemq.artemis.core.journal.RecordInfo objects and these are
> > being created from
> > "org.apache.activemq.artemis.jdbc.store.journal.JDBCJournalImpl#load(org.apache.activemq.artemis.core.journal.LoaderCallback)".
> > Also I see query used by
> > 'org.apache.activemq.artemis.jdbc.store.journal.JDBCJournalImpl' to select
> > messages, it queries complete table, this means if the table has 100000
> > records all of them are read at once and for each row RecordInfo object
> > will be created.
> >
> > Is there a configuration which influences this usecase and through which I
> > can avoid OutOfMemory error ?
> >
> > Regards,
> > Rakesh.A
> >
> >
--
Clebert Suconic
Re: Queue load resulting OutOfMemory exception
Posted by Rakesh Athuru <Ra...@planonsoftware.com.INVALID>.
Hi,
Could you please share JIRA number or pull request or some reference to the improvement you did to JDBC journal implementation, that I can go through.
Usage via Wildfly indeed makes things difficult, due to it having different release cycle.
Regards,
Rakesh.A
________________________________
From: Clebert Suconic <cl...@gmail.com>
Sent: Monday, May 13, 2024 6:04 AM
To: users@activemq.apache.org <us...@activemq.apache.org>
Subject: Re: Queue load resulting OutOfMemory exception
[You don't often get email from clebert.suconic@gmail.com. Learn why this is important at https://aka.ms/LearnAboutSenderIdentification ]
on more recent versions of Artemis, I have improved paging with JDBC.
I would suggest you keep more data on paging by setting an
address-setting#max-size-bytes. However Wildfly is a few versions
behind.
Perhaps you could use Artemis standalone and consume remote from
Wildfly. Artemis is on a faster release cadence than Wildfly. As you
can imagine Wildfly being a bigger project it takes more times for
them to consume Artemis. Especially that they have stringent
requirements on their testsuite.
Emmanuel Hugonet is doing a great job maintaining the compatibility
but it's not easy to keep Wildfly consuming the latest version of
artemis all the time.
On Thu, May 9, 2024 at 9:41 AM Justin Bertram <jb...@apache.org> wrote:
>
> At the moment there is no broker-specific configuration that would impact
> this use-case. I recommend you simply give the JVM more memory to deal with
> the size of the JDBC ResultSet.
>
>
> Justin
>
> On Thu, May 9, 2024 at 3:55 AM Rakesh Athuru
> <Ra...@planonsoftware.com.invalid> wrote:
>
> > Hi,
> >
> > I am using JBoss Wildfly server with ActiveMQ (Artemis) configured.
> > I have a queue with persistency (to MS SQLServer DB) enabled, and when the
> > queue contains lot of messages (persisted to DB), upon restart of the
> > Wildfly server, queue loading results OutOfMemory error.
> > When I looked at heapdump, I see heap contains
> > org.apache.activemq.artemis.core.journal.RecordInfo objects and these are
> > being created from
> > "org.apache.activemq.artemis.jdbc.store.journal.JDBCJournalImpl#load(org.apache.activemq.artemis.core.journal.LoaderCallback)".
> > Also I see query used by
> > 'org.apache.activemq.artemis.jdbc.store.journal.JDBCJournalImpl' to select
> > messages, it queries complete table, this means if the table has 100000
> > records all of them are read at once and for each row RecordInfo object
> > will be created.
> >
> > Is there a configuration which influences this usecase and through which I
> > can avoid OutOfMemory error ?
> >
> > Regards,
> > Rakesh.A
> >
> >
--
Clebert Suconic
Re: Queue load resulting OutOfMemory exception
Posted by Clebert Suconic <cl...@gmail.com>.
on more recent versions of Artemis, I have improved paging with JDBC.
I would suggest you keep more data on paging by setting an
address-setting#max-size-bytes. However Wildfly is a few versions
behind.
Perhaps you could use Artemis standalone and consume remote from
Wildfly. Artemis is on a faster release cadence than Wildfly. As you
can imagine Wildfly being a bigger project it takes more times for
them to consume Artemis. Especially that they have stringent
requirements on their testsuite.
Emmanuel Hugonet is doing a great job maintaining the compatibility
but it's not easy to keep Wildfly consuming the latest version of
artemis all the time.
On Thu, May 9, 2024 at 9:41 AM Justin Bertram <jb...@apache.org> wrote:
>
> At the moment there is no broker-specific configuration that would impact
> this use-case. I recommend you simply give the JVM more memory to deal with
> the size of the JDBC ResultSet.
>
>
> Justin
>
> On Thu, May 9, 2024 at 3:55 AM Rakesh Athuru
> <Ra...@planonsoftware.com.invalid> wrote:
>
> > Hi,
> >
> > I am using JBoss Wildfly server with ActiveMQ (Artemis) configured.
> > I have a queue with persistency (to MS SQLServer DB) enabled, and when the
> > queue contains lot of messages (persisted to DB), upon restart of the
> > Wildfly server, queue loading results OutOfMemory error.
> > When I looked at heapdump, I see heap contains
> > org.apache.activemq.artemis.core.journal.RecordInfo objects and these are
> > being created from
> > "org.apache.activemq.artemis.jdbc.store.journal.JDBCJournalImpl#load(org.apache.activemq.artemis.core.journal.LoaderCallback)".
> > Also I see query used by
> > 'org.apache.activemq.artemis.jdbc.store.journal.JDBCJournalImpl' to select
> > messages, it queries complete table, this means if the table has 100000
> > records all of them are read at once and for each row RecordInfo object
> > will be created.
> >
> > Is there a configuration which influences this usecase and through which I
> > can avoid OutOfMemory error ?
> >
> > Regards,
> > Rakesh.A
> >
> >
--
Clebert Suconic
Re: Queue load resulting OutOfMemory exception
Posted by Justin Bertram <jb...@apache.org>.
At the moment there is no broker-specific configuration that would impact
this use-case. I recommend you simply give the JVM more memory to deal with
the size of the JDBC ResultSet.
Justin
On Thu, May 9, 2024 at 3:55 AM Rakesh Athuru
<Ra...@planonsoftware.com.invalid> wrote:
> Hi,
>
> I am using JBoss Wildfly server with ActiveMQ (Artemis) configured.
> I have a queue with persistency (to MS SQLServer DB) enabled, and when the
> queue contains lot of messages (persisted to DB), upon restart of the
> Wildfly server, queue loading results OutOfMemory error.
> When I looked at heapdump, I see heap contains
> org.apache.activemq.artemis.core.journal.RecordInfo objects and these are
> being created from
> "org.apache.activemq.artemis.jdbc.store.journal.JDBCJournalImpl#load(org.apache.activemq.artemis.core.journal.LoaderCallback)".
> Also I see query used by
> 'org.apache.activemq.artemis.jdbc.store.journal.JDBCJournalImpl' to select
> messages, it queries complete table, this means if the table has 100000
> records all of them are read at once and for each row RecordInfo object
> will be created.
>
> Is there a configuration which influences this usecase and through which I
> can avoid OutOfMemory error ?
>
> Regards,
> Rakesh.A
>
>