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 committed 2021-02-15 07:45:09 +02:00
1 parent 0bc3a1f9e8
commit 7f458d5e78
3 files changed
+10 -2

No files matched your search

+2
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 (