RabbitMQ 3.6.2 queue state show "idle" when incoming and deliver speed are non-zero

14,508 views
Skip to first unread message

zhenbo zeng

unread,
May 26, 2016, 8:06:19 AM5/26/16
to rabbitmq-users
When running rabbitmq 3.6.2, the web management ui show that some queues state are "idle", but the incoming and deliver speed are non-zero.
Is that a bug with the management plugin?


Michael Klishin

unread,
May 26, 2016, 8:16:34 AM5/26/16
to rabbitm...@googlegroups.com
It's not. Queue "state" is normally a reflection of the queue Erlang process state,
which can go in and out of idle many times a second as runtime scheduler gives
it a slice of time to run and unschedules it.

Management stats are emitted once every 5 seconds by default. That's not particularly high
resolution for capturing something that happens many times a second.

--
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-user...@googlegroups.com.
To post to this group, send email to rabbitm...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
MK

Staff Software Engineer, Pivotal/RabbitMQ

zhenbo zeng

unread,
May 26, 2016, 9:53:28 PM5/26/16
to rabbitmq-users
<acronym class="normal" title="Idle since 2016-05-27 1:40:50">idle</acronym>

$ date -R
Fri, 27 May 2016 09:44:48 +0800

There is a "idle since" time, but it is not the local time.




在 2016年5月26日星期四 UTC+8下午8:16:34,Michael Klishin写道:

zhenbo zeng

unread,
May 28, 2016, 2:38:59 PM5/28/16
to rabbitmq-users
format_queue_stats({idle_since, Value}) ->
    [{idle_since, now_to_str(Value)}];



format_channel_stats({idle_since, Value}) ->
    {idle_since, now_to_str(Value)};



now_to_str(MilliSeconds) ->
    BaseDate = calendar:datetime_to_gregorian_seconds({{1970, 1, 1},
                                                       {0, 0, 0}}),
    Seconds = BaseDate + (MilliSeconds div 1000),
    {{Y, M, D}, {H, Min, S}} = calendar:gregorian_seconds_to_datetime(Seconds),
    print("~w-~2.2.0w-~2.2.0w ~w:~2.2.0w:~2.2.0w", [Y, M, D, H, Min, S]).


rabbit_mgmt_format.erl format the "idle since" time, I think now_to_str/1 should call calendar:universal_time_to_local_time/2 before print/2converts to local time.



在 2016年5月26日星期四 UTC+8下午8:06:19,zhenbo zeng写道:

Michael Klishin

unread,
May 29, 2016, 5:23:59 AM5/29/16
to rabbitm...@googlegroups.com
Please file an issue on GH or submit a pull request against the stable branch.

--
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-user...@googlegroups.com.
To post to this group, send email to rabbitm...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Michael Klishin

unread,
May 30, 2016, 2:17:00 AM5/30/16
to rabbitm...@googlegroups.com
FTR, here's the issue:

It makes no sense to change server time to be local. The browser should do the formatting.
Reply all
Reply to author
Forward
0 new messages