My pgbouncer.log grows endlessly.
How do I enable filename rollover or limit the logfile size for pgbouncer on Ubuntu?
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It only takes a minute to sign up.
Sign up to join this communityUntil now, pgBouncer doesn't support rotate log. Hence, you have to do it by yourself.
You can refer to sites below:
logrotate
to take care of it. But there's still a problem, perhaps you can help? After changing the desired logging level to size 100M
, I forced logrotate via logrotate -f
. As a result of that, I'm seeing: error writing to /var/log/postgresql/pgbouncer.log.1: No data available. I.e log rotation has failed! When I do tail -f pgbouncer.log
, I see a ton of log lines being generated in real time, so logging is still going on, but logrotation thinks there's no data available
. What to do!?
Dec 12, 2016 at 10:58
pgbouncer.log
configuration file? (linuxcommand.org/man_pages/logrotate8.html) . Please test before applying to production env.
Dec 12, 2016 at 11:10
pgbouncer.ini
(the configuration file), I can only configure the location of the log files, not their rotation credentials.
Dec 12, 2016 at 11:27
pgbouncer.log
as this blog: raghavt.blogspot.com/2016/08/…. it is not pgbouncer.ini
Dec 12, 2016 at 12:35
rotate
on Linux to do that. (rotate by date & size).pgbouncer.ini
or something? Would appreciate the details.pgbouncer.ini
to rotate logs becausepgBouncer
didn't support rotate logs (asPostgreSQL
). That's why we had to userotate log of Linux
. In terms ofrotate log Ubuntu
, in fact, I didn't remember in details, however, please review digitalocean.com/community/tutorials/… , I think that web can help you.