fix(runtime): cap d601 v03 postgres pools (#1949)
This commit is contained in:
+3
-2
@@ -301,7 +301,7 @@ lanes:
|
||||
port: 5432
|
||||
runtimeStore:
|
||||
postgres:
|
||||
poolMax: 16
|
||||
poolMax: 4
|
||||
connectionTimeoutMs: 5000
|
||||
queryRetryMaxAttempts: 5
|
||||
queryRetryInitialDelayMs: 250
|
||||
@@ -314,7 +314,7 @@ lanes:
|
||||
backoffBaseMs: 0
|
||||
backoffMaxMs: 1
|
||||
postgres:
|
||||
poolMax: 4
|
||||
poolMax: 2
|
||||
queryTimeoutMs: 3000
|
||||
readyTimeoutMs: 2000
|
||||
cache:
|
||||
@@ -599,6 +599,7 @@ lanes:
|
||||
- serviceId: hwlab-user-billing
|
||||
env:
|
||||
HWLAB_USER_BILLING_DB_URL: secretRef:hwlab-cloud-api-v03-db/database-url
|
||||
HWLAB_USER_BILLING_DB_POOL_MAX: "2"
|
||||
HWLAB_BOOTSTRAP_ADMIN_ID: usr_v03_admin
|
||||
HWLAB_BOOTSTRAP_ADMIN_USERNAME: admin
|
||||
HWLAB_BOOTSTRAP_ADMIN_DISPLAY_NAME: HWLAB v0.3 Admin
|
||||
|
||||
@@ -352,7 +352,7 @@ func NewServer(ctx context.Context, cfg Config) (*Server, error) {
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
db.SetMaxOpenConns(8)
|
||||
db.SetMaxOpenConns(envInt("HWLAB_USER_BILLING_DB_POOL_MAX", 4))
|
||||
db.SetMaxIdleConns(4)
|
||||
db.SetConnMaxLifetime(30 * time.Minute)
|
||||
server.db = db
|
||||
|
||||
Reference in New Issue
Block a user