[
https://issues.apache.org/jira/browse/ARTEMIS-2164?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Justin Bertram resolved ARTEMIS-2164.
-------------------------------------
Resolution: Not A Bug
It's still possible to run out of memory even when using paging if the heap is
still too small to hold the configured address size. You've given the JVM a max
of 1024MB. By default, the broker would configure {{global-max-size}} to 1/2 of
the heap's max (i.e. 512MB in this case). I would consider this a safe and
reasonable size. You've set {{global-max-size}} to 717MB which is 33% higher
than the default. Given that you've run out of memory I would conclude that
this isn't a suitable value for your use-case. You need to test and tune until
the broker behaves as you want for your use-case.
> ActiveMQ fails on start with OutOfMemoryError
> ---------------------------------------------
>
> Key: ARTEMIS-2164
> URL: https://issues.apache.org/jira/browse/ARTEMIS-2164
> Project: ActiveMQ Artemis
> Issue Type: Bug
> Components: Broker
> Affects Versions: 2.6.0, 2.6.3
> Environment: MS Windows Server 2016
> Reporter: Benjamin Holzamer
> Priority: Critical
> Attachments: artemis-data.zip, broker.xml
>
>
> When starting ActiveMQ we get an out of memory error:
> {code}
> Exception in thread "main" java.lang.OutOfMemoryError: GC overhead limit
> exceeded
> at
> org.apache.activemq.artemis.utils.collections.TypedProperties$StringValue.readStringValue(TypedProperties.java:899)
> at
> org.apache.activemq.artemis.utils.collections.TypedProperties.decode(TypedProperties.java:407)
> at
> org.apache.activemq.artemis.core.message.impl.CoreMessage.checkProperties(CoreMessage.java:550)
> at
> org.apache.activemq.artemis.core.message.impl.CoreMessage.getScheduledDeliveryTime(CoreMessage.java:319)
> at
> org.apache.activemq.artemis.core.postoffice.impl.PostOfficeImpl.reroute(PostOfficeImpl.java:944)
> at
> org.apache.activemq.artemis.core.server.impl.PostOfficeJournalLoader.handleAddMessage(PostOfficeJournalLoader.java:227)
> at
> org.apache.activemq.artemis.core.persistence.impl.journal.AbstractJournalStorageManager.loadMessageJournal(AbstractJournalStorageManager.java:1167)
> at
> org.apache.activemq.artemis.core.server.impl.ActiveMQServerImpl.loadJournals(ActiveMQServerImpl.java:2618)
> at
> org.apache.activemq.artemis.core.server.impl.ActiveMQServerImpl.initialisePart2(ActiveMQServerImpl.java:2376)
> at
> org.apache.activemq.artemis.core.server.impl.LiveOnlyActivation.run(LiveOnlyActivation.java:72)
> at
> org.apache.activemq.artemis.core.server.impl.ActiveMQServerImpl.internalStart(ActiveMQServerImpl.java:535)
> at
> org.apache.activemq.artemis.core.server.impl.ActiveMQServerImpl.start(ActiveMQServerImpl.java:474)
> at
> org.apache.activemq.artemis.integration.FileBroker.start(FileBroker.java:111)
> at org.apache.activemq.artemis.cli.commands.Run.execute(Run.java:82)
> at org.apache.activemq.artemis.cli.Artemis.internalExecute(Artemis.java:149)
> at org.apache.activemq.artemis.cli.Artemis.execute(Artemis.java:97)
> at org.apache.activemq.artemis.cli.Artemis.execute(Artemis.java:124)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:498)
> at org.apache.activemq.artemis.boot.Artemis.execute(Artemis.java:129)
> {code}
>
> There is one queue: requestQ which has more then 400,000 entries.
> As you can see in the attached broker.xml the paging is activated for all
> addresses.
> Attached you can also find the complete data folder including all messages.
> it is failing on version 2.6.0, also an update to 2.6.3 which is the current
> version did not help.
>
> ActiveMQ was started as windows service with the following parameter:
> {code}
> C:\Program Files\Java\jdk1.8.0_181\bin\java.exe
> -Xbootclasspath/a:F:\XXX\app\artemis\lib\jboss-logmanager-2.0.3.Final.jar
> -XX:+UseParallelGC -XX:+AggressiveOpts -Xms512M -Xmx1024M
> -classpath F:\XXX\app\artemis\lib\artemis-boot.jar
> -Dartemis.home=F:\XXX\app\artemis
> -Dartemis.instance=F:\XXX\app\artemis-broker
> -Ddata.dir=F:\XXX\app\artemis-broker\data
> -Dartemis.instance.etc="F:\XXX\app\artemis-broker\etc"
> -Djava.util.logging.manager=org.jboss.logmanager.LogManager
> -Dlogging.configuration=file:/F:/XXX/app/artemis-broker/etc//logging.properties
>
> -Djava.security.auth.login.config=F:\XXX\app\artemis-broker\etc\login.config
> -Dhawtio.realm=activemq
> -Dhawtio.offline="true"
> -Dhawtio.role=amq
> -Dhawtio.rolePrincipalClasses=org.apache.activemq.artemis.spi.core.security.jaas.RolePrincipal
>
> -Djolokia.policyLocation=file:/F:/XXX/app/artemis-broker/etc//jolokia-access.xml
> org.apache.activemq.artemis.boot.Artemis run
> {code}
>
> We analyzed a heapdump and saw that all the messages got loaded into memory
> regardless that we have activated paging.
>
> Expectation: Using the pagination option, ActiveMQ should not run out of
> memory.
>
>
>
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)