database: expose SetConnMaxLifetime as config setting

For MySQL, setting this to be shorter than the wait_timeout MySQL setting
solves the issue with connection errors after the session has timed out for
the connection to the database via xorm.
This commit is contained in:
Daniel Lee
2018-03-16 01:09:00 +01:00
parent 5a3ba68a9c
commit 9cdd7cb04c
4 changed files with 26 additions and 11 deletions
+3
View File
@@ -90,6 +90,9 @@
# Max conn setting default is 0 (mean not set)
;max_open_conn =
# Connection Max Lifetime default is 14400 (means 14400 seconds or 4 hours)
;conn_max_lifetime = 14400
# Set to true to log the sql calls and execution times.
log_queries =