Nextcloud oc_filecache growing huge : too many rows (hence backup fails with : lost connection to MySQL)

I mean, when you for example change the timeout from 120 seconds to 300 seconds, and compare the logs from the two attempts, does the second run about 180 seconds longer?

Another guess: you changed the timeout of net_r/w_timeout, could it be that that timeout is not used by mysqldump? The flash layer of the SD card is heavily hammered and maybe has to clear blocks before writing data, MySQL is patient enough to wait, but mysqldump thinks MySQL has gone away?

Yes, Nextcloud upgrade: how to shrink oc_filecache.ibd (441GB at the moment), but the topic is closed. If you have a suggestion, I will open a new topic for it.