Give MySQL server up to 1 hour to recover.
This commit is contained in:
parent
c6d3056fee
commit
05c1cbdea5
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue