Give MySQL server up to 1 hour to recover.

This commit is contained in:
Michael Herzberg 2018-08-02 11:47:38 +01:00
parent c6d3056fee
commit 05c1cbdea5
3 changed files with 5 additions and 6 deletions

View File

@ -167,8 +167,8 @@ def const_mysql_config_file():
def const_mysql_maxtries():
return 3
return 12
def const_mysql_try_wait():
return 1
return 300

View File

@ -126,9 +126,10 @@ class MysqlBackend:
raise last_exception
else:
factor = 0.2
logmsg = ("Exception on mysql connection attempt "
logmsg = ("Exception ({}) on mysql connection attempt "
"{} of {}, wating {}s +/- {}% before retrying..."
).format(t + 1,
).format(str(e),
t + 1,
self.maxtries,
self.try_wait, factor * 100)
log_warning(logmsg, 3)

View File

@ -68,8 +68,6 @@ def process_id(from_date, until_date, delayed, path):
try:
with MysqlBackend(
extid,
try_wait=10,
maxtries=30,
delayed=delayed,
cache_etags=True,
read_default_file=const_mysql_config_file(),