Skip to content

db: SetConnMaxLifetime

Warren Gifford requested to merge core/limit-pg into master

Created by: keegancsmith

Setting this we won't hold onto an idle connection forever. Instead every connection has a lifetime of 1 minute. Note: This does not mean we kill connections after 1 minute. The db package scans all idle connections periodically. If an idle connection is older than 1 minute (what we have hardcoded), it will close it.

Part of https://github.com/sourcegraph/sourcegraph/issues/3473

Merge request reports

Loading