0

I need to run rabbitmqctl rotate_logs on a rabbitmq log file that is over 80gb's in size. When I tried to run this the first time it froze rabbit and no messages could be received. The freeze lasted 20 mins before I had to kill the command and restart the rabbit server.

This is a production server and completing this in a small amount of time without losing messages or killing the broker would be optimal.

Would it be possible to shut down the service and move the current log file to another location and restart the service and then run the rotate_logs command?

I'm fairly new to rabbitmq and I am not sure what the best way to handle this would be.

This is installed on a windows 2008 server as a service for a heavy traffic production site (However the message queue has a small load and only affects the administrative side of things).

Any help or insight would be appreciated.

Keefe Higgins
  • 177
  • 2
  • 10

1 Answers1

1

I ran into a similar situation, but with only about 4GB of log file instead of 80.

the workaround I used was pretty much what you suggested... stop the service, move the log file and restart the service as quickly as possible.

for me, specifically, instead of moving the file while the service was stopped i just renamed it. i also wrote a commandline script to do the work for me.

this allowed me to stop the service, rename the file and restart the service in a matter of seconds.

once the service was back up and running, i was free to move / rename / whatever the large log file as needed.

Derick Bailey
  • 72,004
  • 22
  • 206
  • 219