[rabbitmq-discuss] rabbitmq and long vm.dirty_writeback_centisecs

Simon MacMullen simon at rabbitmq.com
Thu Jul 4 11:15:45 BST 2013


On 04/07/13 00:45, Tao Fan wrote:
> I have ubuntu boxes which, for disk life consideration, I have set the
> vm.dirty_writeback_centisecs from 5sec to 30min. However, when the boxes
> have power outage and restored, rabbitmq refused to start up, giving
> error message in log: mnesia_recover crashed.

That's an error from Mnesia; part of Erlang. It may be worth upgrading 
Erlang, R13B03 is quite old. See 
https://www.erlang-solutions.com/downloads/download-erlang-otp for newer 
Erlang debs.

That error is also truncated, it's not clear what has really gone wrong.

> I had to delete schema.DAT under mnesia directory before I can start it
> again but then all my stored messages in persistent queues are lost.
>
> If I do disk sync every minute or two, there is no such issue - rabbitmq
> can survive every power cycle. I like to understand how rabbitmq works
> to survive power cycle and if it is possible to tune it to survive with
> longer sync time without losing any stored messages in queue.

Don't these two requirements contradict each other? If you succeed in 
making sync to disc happen every 30 min (which is probably quite hard, 
RabbitMQ issues fsync() quite frequently), you are going to risk losing 
data on failure.

To be honest I would just leave dirty_writeback_centisecs alone.

Cheers, Simon

-- 
Simon MacMullen
RabbitMQ, Pivotal


More information about the rabbitmq-discuss mailing list