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:
@@ -13,15 +13,15 @@ const connectionString = env.DATABASE_URL
|
||||
const socketDb = drizzle(
|
||||
postgres(connectionString, {
|
||||
prepare: false,
|
||||
idle_timeout: 20,
|
||||
connect_timeout: 10,
|
||||
max: 5,
|
||||
idle_timeout: 10,
|
||||
connect_timeout: 20,
|
||||
max: 15,
|
||||
onnotice: () => {},
|
||||
}),
|
||||
{ schema }
|
||||
)
|
||||
|
||||
// Use dedicated connection for socket operations
|
||||
// Use dedicated connection for socket operations, fallback to shared db for compatibility
|
||||
const db = socketDb
|
||||
|
||||
// Constants
|
||||
|
||||
@@ -11,8 +11,8 @@ const connectionString = env.DATABASE_URL
|
||||
const db = drizzle(
|
||||
postgres(connectionString, {
|
||||
prepare: false,
|
||||
idle_timeout: 20,
|
||||
connect_timeout: 10,
|
||||
idle_timeout: 15,
|
||||
connect_timeout: 20,
|
||||
max: 3,
|
||||
onnotice: () => {},
|
||||
}),
|
||||
|
||||
Reference in New Issue
Block a user