diff options
| author | LazyDBA247-Anyvision <yonin@anyvision.co> | 2021-02-15 07:45:09 +0200 |
|---|---|---|
| committer | LazyDBA247-Anyvision <yonin@anyvision.co> | 2021-02-15 07:45:09 +0200 |
| commit | 7f458d5e78e380890771d925fee3df4f5f692e78 (patch) | |
| tree | 27504329a544b84b097ebb97e7ed4886075d4cd6 /weed/command/scaffold.go | |
| parent | 0bc3a1f9e88baca5f592d50ca028d169c86f0dc8 (diff) | |
| download | seaweedfs-7f458d5e78e380890771d925fee3df4f5f692e78.tar.xz seaweedfs-7f458d5e78e380890771d925fee3df4f5f692e78.zip | |
better postgres connection pool management
adding SetConnMaxLifetime configuration (https://golang.org/pkg/database/sql/#DB.SetConnMaxLifetime)
to enable refresh of stale connections.
Diffstat (limited to 'weed/command/scaffold.go')
| -rw-r--r-- | weed/command/scaffold.go | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/weed/command/scaffold.go b/weed/command/scaffold.go index f838f7791..993391a42 100644 --- a/weed/command/scaffold.go +++ b/weed/command/scaffold.go @@ -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 ( |
