I'm using logrotate
for various log rotation tasks, including rotating log files for the postgresql pooling utility pgbouncer
.
pgbouncer
logs expansively - I accumulate many GBs in a couple of days - thus I changed its config in logrotate.d
to size 100M
and rotate 5
, hoping that this would limit pgbouncer's logs to an aggregate of 500MB.
I then ran logrotate -f /var/logrotate.conf
to force the changes. The command took a good 10 minutes to give me output. The output was error writing to /var/log/postgresql/pgbouncer.log.1: No data available
. I.e. rotation failed for pgbouncer. How do I fix this? Please advise.
p.e. If I do tail -f pgbouncer.log
, I see a ton of log lines being generated in real time, so logging is still going on. Moreover, pgbouncer.log.1
does not exist.