activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gary Tully <gary.tu...@gmail.com>
Subject Re: Memory and Temp Usage Questions
Date Mon, 26 Nov 2012 12:21:24 GMT
you have a slow or blocked consumer that is blocking the send due to the
pending message cursor being full. The blocked send will stop the
connection from being terminated.

To have the cursor spool to disk (temp store) you need to reduce the system
usage memory limit b/c spooling to disk is based on that shared limit. It
is independent of the destination limit.
However, I think it is the destination limit that is visible in the log,
hence the 211%.

Start by increasing the destination limit to the same value as your system
usage memory limit. Do this via a destination policy for your (or all)
topic(s).

There is a known problem with the checking for memory limits in the non
persistent case to avoid the block on the cursor and respect the
sendfailifnospace flag, but that needs some work
Though the cursor is different in the jira, the symptom is related to https
://issues.apache.org/jira/browse/AMQ-3643




On 23 November 2012 15:36, Mark Anderson <manderson23@gmail.com> wrote:

> I have ActiveMQ 5.6.0 configured as follows:
>
> Producer Flow Control = false
> Send Fail If No Space = true
> Memory Usage Limit = 128Mb
> Temp Usage Limit = 1Gb
>
> All my messages are non-persistent. The temp usage is configured to handle
> spikes/slow consumers when processing messages.
>
> I continually see the following in the logs:
>
> WARN  Nov 20 20:55:47 (13748874 [InactivityMonitor Async Task:
> java.util.concurrent.ThreadPoolExecutor$Worker@7ea0e15b[State = 0, empty
> queue]] org.apac
> he.activemq.broker.TransportConnection.Transport) Transport Connection to:
> tcp://192.168.2.103:35186 failed: java.net.SocketException: Broken pipe
> INFO  Nov 20 20:55:51 (13752162 [ActiveMQ Transport: tcp:///
> 192.168.2.103:35168] org.apache.activemq.broker.TransportConnection) The
> connection to 'tcp:
> //192.168.2.103:35166' is taking a long time to shutdown.
> INFO  Nov 20 20:55:56 (13757162 [ActiveMQ Transport: tcp:///
> 192.168.2.103:35168] org.apache.activemq.broker.TransportConnection) The
> connection to 'tcp:
> //192.168.2.103:35166' is taking a long time to shutdown.
> INFO  Nov 20 20:56:01 (13762162 [ActiveMQ Transport: tcp:///
> 192.168.2.103:35168] org.apache.activemq.broker.TransportConnection) The
> connection to 'tcp:
> //192.168.2.103:35166' is taking a long time to shutdown.
>
> I'm not sure why the connection will never shutdown.
>
> I then see the following message:
>
> org.apache.activemq.broker.region.TopicSubscription) TopicSubscription:
> consumer=ID:linux-5ks2-57958-1353426643811-3:1:378:1, destinations=1,
> dispatched=32766, delivered=0, matched=0, discarded=0: Pending message
> cursor
>
> [org.apache.activemq.broker.region.cursors.FilePendingMessageCursor@4c41cfa2
> ]
> is full, temp usage (0%) or memory usage (211%) limit reached, blocking
> message add() pending the release of resources.
>
> This leads me to the following questions:
>
> 1) Why would the memory usage be 211% while temp usage is 0%.
> 2) The thread dump shows that send calls on producers are blocking. Why
> would they not throw exceptions when send fail if no space = true?
> 3) Would the issue with connection shutdown contribute to the memory usage?
>
> Thanks,
> Mark
>



-- 
http://redhat.com
http://blog.garytully.com

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message