RabbitMQ disk is full /var/log/rabbitmq
search cancel

RabbitMQ disk is full /var/log/rabbitmq

book

Article ID: 429854

calendar_today

Updated On:

Products

VMware Tanzu Data Services

Issue/Introduction

RabbitMQ nodes, by default, append all log data to persistent files. Unlike message data, log files are not self-cleaning. Without an active rotation strategy, log files will grow indefinitely until they consume all available disk space on the disk.

Verify if the disk utilization is due to logs

/dev/mapper/rootvg-lv_varlog        10G   10G   20K 100% /var/log
-bash-4.4$ ls -lh
total 6.6G
-rw-r--r--. 1 rabbitmq rabbitmq  6.6 G Feb 18 13:06 [email protected]
-rw-r--r--. 1 rabbitmq rabbitmq 1221K Feb  9 03:37 [email protected]
-rw-r--r--. 1 rabbitmq rabbitmq  134K Feb 16 22:10 [email protected]
-bash-4.4$ pwd
/var/log/rabbitmq

Environment

RabbitMQ

Cause

Log rotation is not implimented in RabbitMQ server

Resolution

Do not delete the .log file while the service is running. Use the truncate command instead

truncate -s 0 /var/log/rabbitmq/[email protected]


Permanent solution is to implement log rotation in the RabbitMQ server

https://www.rabbitmq.com/docs/logging#log-rotation