[
https://issues.apache.org/activemq/browse/AMQ-914?page=comments#action_36921 ]
Daniel Aioanei commented on AMQ-914:
------------------------------------
After more investigation on this issue, I determined the exact moment when the
memory consumption jumps abruptly in a simpler scenario. It happens when a
consumer is created for the queue with 200k+ messages, that is the third line
below:
con = connectionFactory.createConnection();
Session s = con.createSession(true, Session.CLIENT_ACKNOWLEDGE);
MessageConsumer messageConsumer = s.createConsumer(dest);
where connectionFactory is jmsConnectionFactory below:
<!--
###### Transaction manager ######
-->
<bean id="transactionContextManager"
class="org.jencks.factory.TransactionContextManagerFactoryBean"
/>
<bean id="transactionSupport"
class="org.jencks.factory.XATransactionFactoryBean">
<property name="useTransactionCaching" value="true" />
<property name="useThreadCaching" value="true" />
</bean>
<bean id="poolingSupport"
class="org.jencks.factory.SinglePoolFactoryBean">
<property name="maxSize" value="50" />
<property name="minSize" value="0" />
<property name="blockingTimeoutMilliseconds" value="0" />
<property name="idleTimeoutMinutes" value="60" />
<property name="matchOne" value="true" />
<property name="matchAll" value="true" />
<property name="selectOneAssumeMatch" value="true" />
</bean>
<bean id="connectionManager"
class="org.jencks.factory.ConnectionManagerFactoryBean">
<property name="transactionSupport" ref="transactionSupport" />
<property name="poolingSupport" ref="poolingSupport" />
</bean>
<!--
###### JMS ######
-->
<bean id="jmsResourceAdapter"
class="org.apache.activemq.ra.ActiveMQResourceAdapter">
<property name="serverUrl"
value="tcp://localhost:61616?wireFormat.cacheEnabled=false&wireFormat.tightEncodingEnabled=false&jms.useAsyncSend=true"
/>
</bean>
<bean id="jmsManagedConnectionFactory"
class="org.apache.activemq.ra.ActiveMQManagedConnectionFactory">
<property name="resourceAdapter" ref="jmsResourceAdapter" />
</bean>
<bean id="jmsConnectionFactory"
class="org.springframework.jca.support.LocalConnectionFactoryBean">
<property name="managedConnectionFactory"
ref="jmsManagedConnectionFactory" />
<property name="connectionManager" ref="connectionManager" />
</bean>
Please see the attached snapshot of the jmx console connected to activemq.
> OutOfMemoryError
> ----------------
>
> Key: AMQ-914
> URL: https://issues.apache.org/activemq/browse/AMQ-914
> Project: ActiveMQ
> Issue Type: Bug
> Affects Versions: 4.0.1
> Reporter: Daniel Aioanei
> Attachments: activemq.xml
>
>
> I was doing some testing with a single MDP listening to a queue which had
> about 247300 messages, with a postgres backend. ActiveMQ server was started
> using the default activemq startup script (on Linux). In this configuration
> the cpu normally stays mostly idle and I described this behaviour in another
> bug report.
> Another issue came to surface when I tried to profile the client application
> with EclipseColorer to see why a single MDP can't hog my machine. But when I
> tried so, 4 OutOfMemoryError messages were logged by ActiveMQ server. Note
> that I was *not* profiling the server, but the client which is a totally
> different process.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://issues.apache.org/activemq/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira