You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by Orn <or...@yahoo.com> on 2015/08/07 20:28:10 UTC
Memory limit reached
I'm getting the following warning in the ActiveMq log when processing JMS
messages
>> Usage Manager Memory Limit (720332390) reached on queue:feed, size 0.
>> Producers will be throttled to the rate at which messages are removed
>> from this destination to prevent flooding it.
As you can see the size of the queue is 0, a lot has been enqueued and
dequeued ( the same amount), I'm using persistent messages. I was under the
impression that once you dequeue the message that the broker discards it and
won't have to hold any memory for it ?
After this happens my queue stops moving along.
--
View this message in context: http://activemq.2283324.n4.nabble.com/Memory-limit-reached-tp4700568.html
Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.
Re: Memory limit reached
Posted by artnaseef <ar...@artnaseef.com>.
Thanks for letting us know - glad you were able to track it down.
--
View this message in context: http://activemq.2283324.n4.nabble.com/Memory-limit-reached-tp4700568p4700738.html
Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.
Re: Memory limit reached
Posted by Orn <or...@yahoo.com>.
I found it, it was a configuration issue.
The same listener container was defined twice.
cheers !
--
View this message in context: http://activemq.2283324.n4.nabble.com/Memory-limit-reached-tp4700568p4700618.html
Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.
Re: Memory limit reached
Posted by Orn <or...@yahoo.com>.
Have to admit I'm pretty new to this and inherited the project that we have.
This is how my jms template is setup, looks like I don't use transactions
and auto ack, since that's the default.
<bean id="jmsTemplate" class="org.springframework.jms.core.JmsTemplate">
<property name="connectionFactory" ref="connectionFactory"/>
<property name="sessionTransacted" value="false"/>
<property name="receiveTimeout" value="5000"/>
</bean>
The consumers use this interface MessageListener and override onMessage.
Using this code to send to the next Queue, I have 4 Queues.
final Article msgArticle = article;
jmsTemplate.send(this.destination, new MessageCreator() {
@Override
public Message createMessage(Session session) throws
JMSException {
logger.info("finish saving article, send out article for
next step");
ObjectMessage msg = session.createObjectMessage();
msg.setObject(msgArticle);
return msg;
}
});
Does that sound like a reasonable approach ?
Any other information you would want me to provide ?
Thanks,
--
View this message in context: http://activemq.2283324.n4.nabble.com/Memory-limit-reached-tp4700568p4700602.html
Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.
Re: Memory limit reached
Posted by Orn <or...@yahoo.com>.
I will look to see if transactions are in use. In the ActiveMq dashboard the
column -Number Of Pending Messages- is zero.
--
View this message in context: http://activemq.2283324.n4.nabble.com/Memory-limit-reached-tp4700568p4700597.html
Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.
Re: Memory limit reached
Posted by artnaseef <ar...@artnaseef.com>.
Are transactions in use? Perhaps this is the result of an open transaction.
I would need to look more closely at the code to see under what conditions
this can happen, and exactly what that queue size 0 means.
Another thought - look at the inflight count for the queue and make sure
that's zero as well.
--
View this message in context: http://activemq.2283324.n4.nabble.com/Memory-limit-reached-tp4700568p4700595.html
Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.