Skip to content

Commit 60c8f66

Browse files
committed
modify: DBMS connection 관련 최적화
1 parent 8d84f10 commit 60c8f66

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/configs/db.config.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ const poolConfig: pg.PoolConfig = {
1313
host: process.env.POSTGRES_HOST,
1414
password: process.env.POSTGRES_PASSWORD,
1515
port: Number(process.env.POSTGRES_PORT),
16+
max: 10, // 최대 연결 수
17+
idleTimeoutMillis: 30000, // 연결 유휴 시간 (30초)
18+
connectionTimeoutMillis: 5000, // 연결 시간 초과 (5초)
1619
};
1720

1821
if (process.env.NODE_ENV === 'production') {

0 commit comments

Comments
 (0)