mirror of
https://github.com/simstudioai/sim.git
synced 2026-01-09 15:07:55 -05:00
fix(db): revert to dedicated sockets db connection establishment (#1581)
This commit is contained in:
@@ -10,11 +10,28 @@ if (!connectionString) {
|
||||
throw new Error('Missing DATABASE_URL environment variable')
|
||||
}
|
||||
|
||||
console.log(
|
||||
'[DB Pool Init]',
|
||||
JSON.stringify({
|
||||
timestamp: new Date().toISOString(),
|
||||
nodeEnv: process.env.NODE_ENV,
|
||||
action: 'CREATING_CONNECTION_POOL',
|
||||
poolConfig: {
|
||||
max: 30,
|
||||
idle_timeout: 20,
|
||||
connect_timeout: 30,
|
||||
prepare: false,
|
||||
},
|
||||
pid: process.pid,
|
||||
isProduction: process.env.NODE_ENV === 'production',
|
||||
})
|
||||
)
|
||||
|
||||
const postgresClient = postgres(connectionString, {
|
||||
prepare: false,
|
||||
idle_timeout: 20,
|
||||
connect_timeout: 10,
|
||||
max: 20,
|
||||
connect_timeout: 30,
|
||||
max: 30,
|
||||
onnotice: () => {},
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user