On Debian 10,
service rabbitmq-server start takes 10 seconds;
service rabbitmq-server stop takes 5 seconds.
This is for a Docker development environment where load is extremely low and start/stop speed is more important than RabbitMQ performance or reliability. Stopping and re-starting the container takes 15 seconds because of this.
How can I make it faster? I added
log.default.level = debug to
rabbitmq.conf in case it would show me what it's doing during startup, but it didn't give me anything useful.
strace -o strace-log-$(date +%F_%H%M%S).txt -s120 -ttTyfp <rabbitmq-pid>during those 10 seconds to record how rabbitmq is interacting with the kernel. Add a pastebin link to share the trace with us. Make sure you don't have anything confidential in the trace.
watch -n 1 'ps aux|grep ^rabbitmq'during these 10 seconds and there are several processes (more than 10) starting and stopping. Each second they're different. So it's hard to know what you mean by
<rabbitmq-pid>. I was hoping to just tell it "start in the background", but I couldn't find an easy way to do this with systemd.