better mysql connection pool management

adding SetConnMaxLifetime configuration (https://golang.org/pkg/database/sql/#DB.SetConnMaxLifetime)
to enable refresh of connections.
This commit is contained in:
LazyDBA247-Anyvision
2021-01-14 08:14:21 +02:00
parent f17aa1d06c
commit 8eed763b97
2 changed files with 5 additions and 2 deletions

View File

@@ -118,6 +118,7 @@ password = ""
database = "" # create or use an existing database
connection_max_idle = 2
connection_max_open = 100
connection_max_lifetime_seconds = 0
interpolateParams = false
[postgres] # or cockroachdb