We are using -%V_%H%M as the dateformat for logrotate - this causes filename conflicts after a day of uptime due to file name conflicts.
Solution
Use -%Y%m%d_%H:%M as the dateformat (for consistency with pgbouncer)
Alternatives
-%u in the dateformat does not get correctly substituted as per the docs:
error: destination /var/log/mysql/archive_general/general.log-%u_1637 already exists, skipping rotation
root@mysql-k8s-0:/# ls -la /var/log/mysql/archive_error/
total 8
drwxrwx--- 2 mysql mysql 4096 Nov 30 16:37 .
drwxr-xr-x 1 mysql mysql 4096 Nov 30 16:37 ..
-rw-r----- 1 mysql mysql 0 Nov 30 16:36 error.log-%u_1637
Issue
We are using
-%V_%H%M
as the dateformat for logrotate - this causes filename conflicts after a day of uptime due to file name conflicts.Solution
Use
-%Y%m%d_%H:%M
as the dateformat (for consistency with pgbouncer)Alternatives
-%u
in the dateformat does not get correctly substituted as per the docs: