[rabbitmq-discuss] Gracefully shutting down rabbitmq

Ben Hood 0x6e6562 at gmail.com
Mon Sep 1 21:07:35 BST 2008


On Mon, Sep 1, 2008 at 5:31 PM, Aman Gupta <rabbitmq at tmm1.net> wrote:
> I have approximately 10k durable queues and 5k durable exchanges. These must
> be durable; in addition I also have several other exchanges and queues that
> don't need to be durable and are not marked as such.

That doesn't seem like much. I just created 5k exchanges and
created/bound 2 queues to each (i.e. 10k queues), which took about 9
secs to complete, and then I shut the broker down, and restarted it.
The recovery phase took about 20 secs, so I'm wondering what is taking
so long when your broker has to recover. Another possibility is that
it is spending the time in playing the log back in, which happens
after the mnesia recovery phase.

> Are there any other commands or options for triggering a shutdown of
> rabbitmq?

My favourites are Ctrl-C, kill-9 and halt() :-)

On a more official note, you can call use the rabbitmqctl script with
the argument stop, but that just calls the rabbit_control module with
the stop argument, which is what you are effectively doing with the
command you mentioned previously.

If you do have Rabbit running in a shell (or even via a remote shell),
another *cleaner* option is use the OTP application handler i.e.

1> application:stop(rabbit).

I'll try to replicate your problem running the same command as you did.

BTW, when you run this command, do you see an epmd process running in
your activity log?



More information about the rabbitmq-discuss mailing list