Skip to content

Commit d07a9de

Browse files
authored
catalog pool: don't set MinConns to 1 (#3404)
health check only runs once a minute, so pool wasn't aggressively culled meanwhile MinConns counterbalance keeps cold services lukewarm
1 parent 6c91933 commit d07a9de

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

flow/activities/flowable.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1031,7 +1031,7 @@ func (a *FlowableActivity) emitLogRetentionHours(
10311031

10321032
var activeFlowStatuses = map[protos.FlowStatus]struct{}{
10331033
protos.FlowStatus_STATUS_RUNNING: {},
1034-
protos.FlowStatus_STATUS_PAUSED: {},
1034+
protos.FlowStatus_STATUS_PAUSED: {},
10351035
protos.FlowStatus_STATUS_PAUSING: {},
10361036
protos.FlowStatus_STATUS_SETUP: {},
10371037
protos.FlowStatus_STATUS_SNAPSHOT: {},

flow/internal/catalog.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,8 @@ func GetCatalogConnectionPoolFromEnv(ctx context.Context) (shared.CatalogPool, e
2929
return shared.CatalogPool{},
3030
exceptions.NewCatalogError(fmt.Errorf("unable to parse catalog connection string: %w", err))
3131
}
32-
config.MinConns = 1
3332
config.MaxConns = 3
34-
config.MaxConnIdleTime = time.Second
33+
config.MaxConnIdleTime = 90 * time.Second
3534
pool, err = pgxpool.NewWithConfig(ctx, config)
3635
if err != nil {
3736
return shared.CatalogPool{Pool: pool},

0 commit comments

Comments
 (0)