From 2ee809cf5877b4d3a466c9819b417b7bab353f0a Mon Sep 17 00:00:00 2001 From: yangdx Date: Thu, 22 May 2025 16:37:18 +0800 Subject: [PATCH] Increase PG connection pool to 20 --- lightrag/kg/postgres_impl.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lightrag/kg/postgres_impl.py b/lightrag/kg/postgres_impl.py index 02bcdeb2..384099c8 100644 --- a/lightrag/kg/postgres_impl.py +++ b/lightrag/kg/postgres_impl.py @@ -55,7 +55,7 @@ class PostgreSQLDB: self.password = config.get("password", None) self.database = config.get("database", "postgres") self.workspace = config.get("workspace", "default") - self.max = int(config.get("max_connections", 12)) + self.max = int(config.get("max_connections", 20)) self.increment = 1 self.pool: Pool | None = None @@ -314,7 +314,7 @@ class ClientManager: ), "max_connections": os.environ.get( "POSTGRES_MAX_CONNECTIONS", - config.get("postgres", "max_connections", fallback=12), + config.get("postgres", "max_connections", fallback=20), ), }