Skip to content

HikariCP의 커넥션 풀을 설정해도 PGSQL의 커넥션 풀이 가득차는 문제 #240

@mete0rfish

Description

@mete0rfish

🚨 요약

현재 supabase의 PostgreSQL Server를 사용중입니다.
Free Plan의 경우, 최대 30개의 커넥션 연결만 제공합니다.

이를 예방하고자 hikariCP의 커넥션 풀을 다음과 같이 설정했습니다.

# 최대 커넥션 풀 사이즈를 10개로 한정
spring.datasource.hikari.maximum-pool-size=10
# 300,000ms(5분)동안 커넥션이 유지될 경우, WARN 로그 발생
spring.datasource.hikari.leak-detection-threshold=300000
# 300,000ms(5분)동안 커넥션을 얻기 위해  기다림
spring.datasource.hikari.connection-timeout=300000
# 1,800,000ms(30분)동안만 커넥션이 유지됨
spring.datasource.hikari.max-lifetime=1800000

그런데, 계속해서 PGSQL에서 Connection Pool이 가득차는 문제가 발생.

📽️ 재현 방법

❓ 이유

💡 제안

🔗 관련 링크

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions