Skip to content

armgit / dify

Public Imported from GitHub
0

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.

fix: increase maximum PostgreSQL connections to 200 (#35439)

Markus Lobedannda00de668886
diff --git a/docker/.env.example b/docker/.env.example
index 81761556986..ec7d572057b 100644
--- a/docker/.env.example
+++ b/docker/.env.example
@@ -273,7 +273,7 @@ SQLALCHEMY_POOL_TIMEOUT=30
# Default is 100
#
# Reference: https://www.postgresql.org/docs/current/runtime-config-connection.html#GUC-MAX-CONNECTIONS
-POSTGRES_MAX_CONNECTIONS=100
+POSTGRES_MAX_CONNECTIONS=200
# Sets the amount of shared memory used for postgres's shared buffers.
# Default is 128MB
diff --git a/docker/docker-compose.yaml b/docker/docker-compose.yaml
index a10fdf77c6c..aaf099453a4 100644
--- a/docker/docker-compose.yaml
+++ b/docker/docker-compose.yaml
@@ -70,7 +70,7 @@ x-shared-env: &shared-api-worker-env
SQLALCHEMY_POOL_PRE_PING: ${SQLALCHEMY_POOL_PRE_PING:-false}
SQLALCHEMY_POOL_USE_LIFO: ${SQLALCHEMY_POOL_USE_LIFO:-false}
SQLALCHEMY_POOL_TIMEOUT: ${SQLALCHEMY_POOL_TIMEOUT:-30}
- POSTGRES_MAX_CONNECTIONS: ${POSTGRES_MAX_CONNECTIONS:-100}
+ POSTGRES_MAX_CONNECTIONS: ${POSTGRES_MAX_CONNECTIONS:-200}
POSTGRES_SHARED_BUFFERS: ${POSTGRES_SHARED_BUFFERS:-128MB}
POSTGRES_WORK_MEM: ${POSTGRES_WORK_MEM:-4MB}
POSTGRES_MAINTENANCE_WORK_MEM: ${POSTGRES_MAINTENANCE_WORK_MEM:-64MB}