diff --git a/.env.example b/.env.example index bd7c8ae4..37f5f68d 100644 --- a/.env.example +++ b/.env.example @@ -3,8 +3,13 @@ # ============================================================================== # --- DATABASE (High Performance Pooling & Strict Timeouts) --- -DATABASE_URL="mysql://user:password@localhost:3306/dbname?charset=utf8mb4&connection_limit=150&connect_timeout=5" -DATABASE_POOL_SIZE=150 +# The pool size is governed by DATABASE_POOL_SIZE (src/lib/db.ts); the +# `connection_limit` in the URL is only honoured by tools that read the URL +# directly (drizzle-kit, scripts). Keep both in step and keep them well below +# MariaDB's `max_connections` (151 by default) or the emulator and any second +# CMS instance get "Too many connections". README §performance: pool size 25. +DATABASE_URL="mysql://user:password@localhost:3306/dbname?charset=utf8mb4&connection_limit=25&connect_timeout=5" +DATABASE_POOL_SIZE=25 DATABASE_IDLE_TIMEOUT_MS=60000 DATABASE_CONNECT_TIMEOUT_MS=5000