You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by MattF <fa...@hotmail.com> on 2012/08/29 08:33:22 UTC

ActiveMQ Inactivity Monitor

I have recently been having an issue with the ActiveMQ connection timing out
while performing a lengthy garbage collection. this seems to be due to all
threads being suspended including the threads dedicated to Inactivity
Monitoring and then dropping the connection on resuming.

I have been investigating the possibility of disabling the Inactivity
Monitor however I would like to know;

1. If there are any adverse affects on the broker or client?
2. What happens if the client terminates the connection abnormally? how does
the broker know the client is no longer present?

Any input and advice would be much appreciated.

Regards,

Matt.



--
View this message in context: http://activemq.2283324.n4.nabble.com/ActiveMQ-Inactivity-Monitor-tp4655751.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: ActiveMQ Inactivity Monitor

Posted by pp123 <pr...@gmail.com>.
Hi , 

Please help me to fix this . 

Scenario : 
Protocol :Mqtt 
client : Subscriber 
Active Mq version : 5.8.0 
I connected to Broker using client ID : 1000 .After that without sending
disconnect command (removed the lan cable ) i disconnected the client .So
expectation is after 1.5* keepalive time inactivity monitor should check for
clients and it should disconnect all clients which are not sending
pingRequest. Source: http://activemq.apache.org/mqtt.html . But this is not
happening as Broker is holding connection for more time .Inactivity monitor
is closing the connection sometimes in 2nd check or in 3rd check.I am not
able to find anything about this on google. Please help. 

Client sends keepalive of 60 seconds. So total 1.5 * 60 = 90 seconds of
heartbeat is set. 

Please help me to fix this issue. 





--
View this message in context: http://activemq.2283324.n4.nabble.com/ActiveMQ-Inactivity-Monitor-tp4655751p4666428.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: ActiveMQ Inactivity Monitor

Posted by Gary Tully <ga...@gmail.com>.
If a client or broker abnormally dies, without the inactivity monitor
you are dependent on OS level timeouts to notice the absence of
network activity. So OS level tcp/ip settings for read timeouts etc.
Essentially you get half closed sockets so the other end is in the
dark. But the OS has options to configure these timeouts. Unlike the
inactivity monitor that is per connection, the OS limits are system or
interface wide.

Btw, if GC it taking a long time (> 30 seconds), you may want to look
at increasing heap allocation or some other jvm performance options.
The default timeout is 30s so a GC that takes 30s is a real problem.

On 29 August 2012 07:33, MattF <fa...@hotmail.com> wrote:
> I have recently been having an issue with the ActiveMQ connection timing out
> while performing a lengthy garbage collection. this seems to be due to all
> threads being suspended including the threads dedicated to Inactivity
> Monitoring and then dropping the connection on resuming.
>
> I have been investigating the possibility of disabling the Inactivity
> Monitor however I would like to know;
>
> 1. If there are any adverse affects on the broker or client?
> 2. What happens if the client terminates the connection abnormally? how does
> the broker know the client is no longer present?
>
> Any input and advice would be much appreciated.
>
> Regards,
>
> Matt.
>
>
>
> --
> View this message in context: http://activemq.2283324.n4.nabble.com/ActiveMQ-Inactivity-Monitor-tp4655751.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.



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