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?
Lapineige:
Do you have a topic on this, so I can avoid the off-topic here ?
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.