disk_free_limit configuration not working as advertised

332 views
Skip to first unread message

Per Bergland

unread,
Jan 4, 2016, 4:43:36 AM1/4/16
to rabbitmq-users
Hello all,

I can't seem to get the documented ways of setting disk_free_limit to work as is described in the official documentation. This is all when using RMQ 3.5.4.

1. The set_disk_free_limit command documented on https://www.rabbitmq.com/disk-alarms.html does not seem to exist. When I try to invoke it I get a wall of text describing all available commands.
The workaround seems to be to invoke rabbitmqctl eval 'rabbit_disk_monitor:set_disk_free_limit(10000000000).' instead

2. The readable syntax documented on https://www.rabbitmq.com/disk-alarms.html also does not seem to work. When I try the syntax on that page - {disk_free_limit, "1GB"} - I get the stack trace below and the rabbit_disk_monitor subprocess does not start up (but everything else does so it's hard to detect)

Stack trace: [{error_logger_file_h,write_event,
                  [{<0.47.0>,"/var/log/rabbitmq/rab...@vagrant-centos-6.log",
                    []},
                   {error_report,<0.149.0>,
                       {<0.157.0>,supervisor_report,
                        [{supervisor,{local,rabbit_disk_monitor_sup}},
                         {errorContext,start_error},
                         {reason,
                             {badarith,
                                 [{rabbit_disk_monitor,set_disk_limits,2,[]},
                                  {rabbit_disk_monitor,init,1,[]},
                                  {gen_server,init_it,6,
                                      [{file,"gen_server.erl"},{line,328}]},
                                  {proc_lib,init_p_do_apply,3,
                                      [{file,"proc_lib.erl"},{line,240}]}]}},
                         {offender,
                             [{pid,undefined},
                              {name,rabbit_disk_monitor},
                              {mfargs,
                                  {rabbit_disk_monitor,start_link,["1GB"]}},
                              {restart_type,{transient,1}},
                              {shutdown,4294967295},
                              {child_type,worker}]}]}}],
                  [{file,"error_logger_file_h.erl"},{line,114}]},
              {error_logger_file_h,handle_event,2,
                  [{file,"error_logger_file_h.erl"},{line,79}]},
              {rabbit_error_logger_file_h,safe_handle_event,3,[]},
              {gen_event,server_update,4,[{file,"gen_event.erl"},{line,538}]},
              {gen_event,server_notify,4,[{file,"gen_event.erl"},{line,520}]},
              {gen_event,server_notify,4,[{file,"gen_event.erl"},{line,522}]},
              {gen_event,handle_msg,5,[{file,"gen_event.erl"},{line,261}]},
              {proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,240}]}]

After this has failed, I get:

sudo rabbitmqctl eval 'rabbit_disk_monitor:set_disk_free_limit(10000000000).'
Error: {noproc,{gen_server,call,
                           [rabbit_disk_monitor,
                            {set_disk_free_limit,10000000000},
                            infinity]}}

Is this because I'm running a too old version of RMQ (it's really not that old) or is the documentation wrong?

Regards,
Per

Per Bergland

unread,
Jan 4, 2016, 5:02:58 AM1/4/16
to rabbitmq-users
So it seems that this works in RMQ 3.6.0-1

/Per

Michael Klishin

unread,
Jan 4, 2016, 7:40:04 AM1/4/16
to rabbitm...@googlegroups.com, Per Bergland
On 4 January 2016 at 12:43:39, Per Bergland (per.be...@meltwater.com) wrote:
> This is all when using RMQ 3.5.4.

Absolute values are not supported in that version:
http://www.rabbitmq.com/changelog.html 
--
MK

Staff Software Engineer, Pivotal/RabbitMQ


Per Bergland

unread,
Jan 4, 2016, 7:57:11 AM1/4/16
to rabbitmq-users, per.be...@meltwater.com
Thanks.

Actually, absolute values for disk low watermark work just fine in 3.5.4, just not the abbreviations (like 10GB instead of 10000000000). I could find that the set_disk_free_limit rabbitmqctl command was added in 3.6.0 but not any reference to when the support for human-readable forms was added.

Cheers,
Per

Michael Klishin

unread,
Jan 4, 2016, 8:03:26 AM1/4/16
to rabbitm...@googlegroups.com, Per Bergland, per.be...@meltwater.com
 On 4 January 2016 at 15:57:13, Per Bergland (per.be...@meltwater.com) wrote:
> Actually, absolute values for disk low watermark work just
> fine in 3.5.4, just not the abbreviations (like 10GB instead
> of 10000000000).

Ah, yes, it's absolute values for RAM that are new-ish.

> I could find that the set_disk_free_limit
> rabbitmqctl command was added in 3.6.0 but not any reference
> to when the support for human-readable forms was added.

In the same release:

https://github.com/rabbitmq/rabbitmq-server/issues/461
https://github.com/rabbitmq/rabbitmq-server/issues/448

Per Bergland

unread,
Jan 4, 2016, 8:46:32 AM1/4/16
to Michael Klishin, rabbitm...@googlegroups.com
Alright thanks Michael!

/Per
--



Per Bergland
Engineering Director, Meltwater Gothenburg
T: +46 703 42 88 95
per.be...@meltwater.com | www.meltwater.com
Twitter  |  LinkedIn  |  Skype:  perbergland

Want up to the minute insights? We’ll keep an eye out.

Reply all
Reply to author
Forward
0 new messages