Skip to content

Commit

Permalink
increase postgres max_connections above 100 connections (#2740)
Browse files Browse the repository at this point in the history
* use default value and env for postgres max_connections
  • Loading branch information
erfantkerfan authored Mar 6, 2024
1 parent 687a635 commit 7691add
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,6 @@ WAL2JSON_VERSION=latest
HEALTHCHECK_INTERVAL=30s
HEALTHCHECK_TIMEOUT=1m30s
HEALTHCHECK_RETRIES=10
# Caution: Raising max connections of postgres increases CPU and RAM usage
# see https://github.com/getsentry/self-hosted/pull/2740 for more information
POSTGRES_MAX_CONNECTIONS=100
2 changes: 2 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,8 @@ services:
"max_replication_slots=1",
"-c",
"max_wal_senders=1",
"-c",
"max_connections=${POSTGRES_MAX_CONNECTIONS:-100}",
]
environment:
POSTGRES_HOST_AUTH_METHOD: "trust"
Expand Down

0 comments on commit 7691add

Please sign in to comment.