XataX
Xata11mo ago
kalem868

Connection terminated unexpectedly

I have my database set up like this
const pool = new Pool({
connectionString: process.env.XATA_DATABASE_URL,
max: 10,
});

export const db = drizzle(pool, {
schema: {
Invoices,
Customers,
Users,
BankAccounts,
Withdrawals,
},
});


it works but after a while I keep getting this error

uncaughtException: Error: Connection terminated unexpectedly
at Connection

Not sure what I am doing wrong
Was this page helpful?