Hi guys, I was finally figure out problem:
it was with mysql connection timeout. I set wait_timeout and interactive_timeout to small values (60s), because many sites,cms etc. don't correctly close connections.
ispconfig backup script is running long time and mysql close connection. So I contribute path:
/usr/local/ispconfig/server/lib/classes/db_mysql.inc.php
Code:
105 105 public function query($queryString) {
106 parent::ping();
106 107 $this->queryId = parent::query($queryString);
ping check for connection and if lost and
mysqli.reconnect is enabled them reconnect it.
So enable reconnect in /etc/php5/cli/php.ini
Code:
mysqli.reconnect = On
Here is question if is not better to have custom php.ini for ispconfig cronjobs, which will have preddefined values, because backup files have UTC time by default. I have to set timezone also.
It's working now
I also edit cron job, I change nice and ionice, because backuping is intensive task
Code:
30 00 * * * /usr/bin/nice -n19 /usr/bin/ionice -c3 /usr/local/ispconfig/server/cron_daily.sh > /dev/null 2>> /var/log/ispconfig/cron.log
I don't know, what is better:
Calling ping direct in query function, or call it in long time scripts before every query?
Changing nice and ionice for whole cron_daily.sh or only in backup section when calling zip/tar/gzip commands?
Recent comments
2 days 9 hours ago
2 days 18 hours ago
2 days 20 hours ago
2 days 22 hours ago
2 days 23 hours ago
3 days 1 hour ago
3 days 2 hours ago
3 days 3 hours ago
3 days 19 hours ago
3 days 20 hours ago