Nextcloud Snap 21.0.1 with 1GB mysql binlog files generated every 1h

Hello

Nextcloud Snap did upgrade itself to 21.0.1 successfully a couple of days ago.
Everything is running fine, sometimes a bit slow, but not a problem for me.
The issue that I have, is that the free space available is shrinking by about 1GB every hour.
I did some digging and found that in the directory
/var/snap/nextcloud/27920/mysql
a new sequential log file of about 1GB get generated every hour
we are now at logbin.000049
I have approx. 24GB left, and therefore 24h to solve the issue.
Operating system and version: Ubuntu Linux 20.04.2
Headless accessed via webmin.
Beside Nextcloud there is no other service on the server.

I’m not an expert and I would appreciate some help.

Thank you in advance!
Kenny

Update

the hourly generation of 1GB log files progressed yesterday during the day. I’ve tried to connect to mysql via command in webmin with
sudo nextcloud.mysql-client -s /tmp/sockets/mysql.sock -u NEXTCLOUD-ADM-USERNAME -p PASSWORD
but could not get the mysql prompt. I’ve only got the mysql help screen and could not pass any command with the “-e “option. By the way I’m not sure what the correct DB name is.

Then in webmin I’ve stopped the mysql service, deleted 50 logbin.0000XX files of 1GB each, deleted their filename from the logbin.index file and restarted the mysql service.
Around midnight there was a break of the 1GB logbin.0000XX files generation. This morning al 06:00 AM the generation, with heavy CPU usage, resumed. It seems to be related to nextcloud clients being connected.

I’ve found someone else with similar, unsolved problems

but I have nextcloud snap 21.0.1 and my mysql is MariaDB 10.3.29 (from the snap installation).

Any idea?

Thanks.
Kenny

Hey Kenny … i do not know much about “snap” …

i’m using also binlogs (binary logs) for my mysql database.

in the sql config file (/etc/.my.cnf) you would have the possibility to control the retention time of your binlogs. In my config this looks like →

log-bin = /var/lib/mysql/binlog/binlog
expire_logs_days = 7 # seven days retention

in this case, after 7 days the binlog-files will be removed automatically by the db.

Important is in any way - not to remove the binlogs manually - see here →

There is also a “relative” importance to do sql-backups in the right manner, when using binlogs (because you would wish to use the a PIT-(Point-In-Time) restore probably one day) →

Incremental MySQL Server Backup via Binary Log | SqlBak Blog

Hope this can help you a little bit :slight_smile:

Hi Githopp192

Thank you for your input. I have a snap installation and unfortunately I’m not allowed to make any change to my.cnf (no write permission, no permission to change permissions).
The CPU is at 90-100% all the time and 1GB log files are still generated every hour. I don’t have any alternative than to delete logbin.0000XX files and deleted their filename from the logbin.index file.

Anyone else with a good idea?
Thanky
Kenny

Thanks Kenny and Githopp192 for bringing this up here!
I have the same problem and no other solution.
I just want to mention that there is a github issue about this problem:

Maybe you would like to follow this, too.

Hey everyone i have the same issue
Snap 21.01

Ah I just posted a new message in support about this, as I have 8GB of files and 21GB of database binlogs.

Good that I’m not alone, bad that there seems no solution - I just had to upgrade my VPS to deal with the low storage condition, but it’s not really ‘my’ files taking up the space :frowning:

Hi
The last update (21.0.1snap2) solved my problems.
Which Snap version are you running?