fix(deploy): migrate after stop and shrink DB pool
Stage migrate hit ER_CON_COUNT_ERROR while live still held the pool. Build in stage with DATABASE_POOL_SIZE=5, run db:migrate only after stopping the service (with retries), and lower the default pool from 40 to 10. Co-authored-by: Cursor <[email protected]>
This commit is contained in:
1 parent
687e1f9fb0
commit
fa40eebeed
4 files changed
+34
-7
No files matched your search
+1
-1
@@ -8,7 +8,7 @@ const schema = z.object({
|
||||
.enum(["development", "test", "production"])
|
||||
.default("development"),
|
||||
DATABASE_URL: z.string().url(),
|
||||
DATABASE_POOL_SIZE: z.coerce.number().int().positive().default(40),
|
||||
DATABASE_POOL_SIZE: z.coerce.number().int().positive().default(10),
|
||||
DATABASE_IDLE_TIMEOUT_MS: z.coerce.number().int().positive().default(300_000),
|
||||
DATABASE_CONNECT_TIMEOUT_MS: z.coerce
|
||||
.number()
|
||||
|
||||
Reference in new issue
Block a user