Long Backup Problem (Reopening #4497)
Referring to #3822 and #4497 (closed), is there any other solution beside using large wait_timeout? Using that way give me too many sleep connections of inappropriate closed connections (I cannot control how dev people work). It seem "mysql.reconnect = On" in php.ini is not working either because mysqli.ping() is not working as expected, it cannot restore the lost connection due to wait timeout so the database backup query is not executed. If it is the only solution, I think it is better if backup script can set their own session of wait_timeout dynamically so it can use as large as it needs without giving sleep connections side effect. Otherwise, it seem that it is better if the database backup is done first before the file backup.
Same issue there.
We have a mysql server with wait_timeout of 30 seconds and after updating from 126.96.36.199 to 3.1.5 only few db backups are retained.
More in depth, all marked dbs are backed up but only the first ones are written to the web_backup table. So when the cron garbage collection function is executed it delete the files that are on disk but not in db.
I did not make intensive tests but seems that the attached dirty patch can solve the problem ISPConfig-3.1.5_db_timeout.patch
Another option may be to set
$conf['db_client_flags'] = MYSQLI_CLIENT_INTERACTIVE;in config.inc.php when #4558 will be implemented and also in conjunction with an high value of interactive_timeout mysql global variable.