Rabbit mq flow state

523 views
Skip to first unread message

springusr

unread,
Dec 2, 2016, 12:45:55 PM12/2/16
to rabbitmq-users
I have read lot of blogs, comments on forums on this topic. My question is as application developer , what I am supposed to do to recover from it. Right now I have connection in flow state, application is hung. How can I detect this and take action. Also while I am having this not all applications impacted with flow state. And my load is also not high at all.

springusr

unread,
Dec 2, 2016, 12:47:15 PM12/2/16
to rabbitmq-users
I am using spring amqp abstraction so org.springframework.amqp.rabbit.connection.CachingConnectionFactory and org.springframework.amqp.rabbit.core.RabbitAdmin and RabbitTemplate.

Arnaud Cogoluègnes

unread,
Dec 5, 2016, 4:31:00 AM12/5/16
to rabbitm...@googlegroups.com
Are you still experiencing the same issue as in [1] or is it something else?

For [1], we filled in an issue and the fix should ship in 4.1.0 of the Java Client (in the next upcoming weeks probably).

If this is something else, we need more information (e.g. version of the server, server logs, kind of loads in the application).

Have you read [2] and [3]? They should help you diagnose flow control issues.



--
You received this message because you are subscribed to the Google Groups "rabbitmq-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rabbitmq-users+unsubscribe@googlegroups.com.
To post to this group, send email to rabbitmq-users@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

springusr

unread,
Dec 5, 2016, 10:35:25 PM12/5/16
to rabbitmq-users
For [1] , yes that channel timeout enhancement will help. Right locslnow we made few changes and now we are running into flow state - where server is healthy, we are not producing too fast messages etc, right now no clue on reasons behind flow state. Ideally when I produced flow state on my local it was flowing messages though but in test env once flow state it just hangs. Threads which are communicating to rabbit hangs which actually leads [1]. I will keep posted on what we learn.
To unsubscribe from this group and stop receiving emails from it, send an email to rabbitmq-user...@googlegroups.com.
To post to this group, send email to rabbitm...@googlegroups.com.

Arnaud Cogoluègnes

unread,
Dec 6, 2016, 6:35:20 AM12/6/16
to rabbitm...@googlegroups.com

To unsubscribe from this group and stop receiving emails from it, send an email to rabbitmq-users+unsubscribe@googlegroups.com.
To post to this group, send email to rabbitmq-users@googlegroups.com.

springusr

unread,
Dec 6, 2016, 10:04:00 AM12/6/16
to rabbitmq-users
Thanks I will give a try..just so you know we will need way to set this in spring abstraction as well like in caching conn factory, right ? Though for this I will try to use library direct or I will just add this new version and can live with 10 min default timeout.

Michael Klishin

unread,
Dec 6, 2016, 10:11:06 AM12/6/16
to rabbitm...@googlegroups.com
I believe spring-amqp allows you to access RabbitMQ's ConnectionFactory.
That's not to say spring-amqp won't have those respective settings but it's going to happen
in Spring AMQP 2.x (which can require RabbitMQ Java client 4.x).

To unsubscribe from this group and stop receiving emails from it, send an email to rabbitmq-users+unsubscribe@googlegroups.com.
To post to this group, send email to rabbitmq-users@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
MK

Staff Software Engineer, Pivotal/RabbitMQ

Arnaud Cogoluègnes

unread,
Dec 6, 2016, 11:17:44 AM12/6/16
to rabbitm...@googlegroups.com
There are ways to provide the RabbitMQ native ConnectionFactory to Spring AMQP CachingConnectionFactory, take a look at the Spring AMQP documentation [1] (link is for XML, but Java configuration equivalent should be straightforward).

You should provide a shorter timeout (e.g. 10 seconds), at least for easier testing. FYI, automatic recovery is enabled by default as of RabbitMQ Java Client 4.0. Take this into account when testing/observing your application. 

To unsubscribe from this group and stop receiving emails from it, send an email to rabbitmq-users+unsubscribe@googlegroups.com.
To post to this group, send email to rabbitmq-users@googlegroups.com.

springusr

unread,
Dec 6, 2016, 3:07:04 PM12/6/16
to rabbitmq-users
General question - is it okay to see channels in running mode even if there is no connection (Application stopped). I think those hanging channels locking application.

Michael Klishin

unread,
Dec 6, 2016, 3:10:04 PM12/6/16
to rabbitm...@googlegroups.com
It depends where you see them. Management UI records cannot possibly lock anything.
I doubt that channel processes in the server with a closed connection can affect your application
in general: all channel objects in the client should be garbage collected with their closed connection.
If that's not the case then most likely something is holding a reference to the closed connection object.

To unsubscribe from this group and stop receiving emails from it, send an email to rabbitmq-users+unsubscribe@googlegroups.com.
To post to this group, send email to rabbitmq-users@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--

springusr

unread,
Dec 6, 2016, 3:17:54 PM12/6/16
to rabbitmq-users
Ya it was on mgmt console, first I saw applicattion hung as mentioned above on getting queue properties call (From stack trace) , so I stopped application, so that closed connection as it should but even then those channels in running mode.

Michael Klishin

unread,
Dec 6, 2016, 3:24:07 PM12/6/16
to rabbitm...@googlegroups.com
You can reset your stats DB as documented in http://www.rabbitmq.com/management.html.

To unsubscribe from this group and stop receiving emails from it, send an email to rabbitmq-users+unsubscribe@googlegroups.com.
To post to this group, send email to rabbitmq-users@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages