better postgres connection pool management

adding SetConnMaxLifetime configuration (https://golang.org/pkg/database/sql/#DB.SetConnMaxLifetime)
to enable refresh of stale connections.
This commit is contained in:
LazyDBA247-Anyvision
2021-02-15 07:45:09 +02:00
parent 0bc3a1f9e8
commit 7f458d5e78
3 changed files with 10 additions and 2 deletions

View File

@@ -160,6 +160,7 @@ schema = ""
sslmode = "disable"
connection_max_idle = 100
connection_max_open = 100
connection_max_lifetime_seconds = 0
[postgres2]
enabled = false
@@ -181,6 +182,7 @@ schema = ""
sslmode = "disable"
connection_max_idle = 100
connection_max_open = 100
connection_max_lifetime_seconds = 0
[cassandra]
# CREATE TABLE filemeta (