error: Connection terminated unexpectedly

hi i am making a nodejs application that uses drizzle neon database. However, it terminates itself even though i do not do anything after a few minutes later.
No description
No description
6 Replies
Angelelz
Angelelz8mo ago
This is something on the driver. Drizzle is probably not terminating your connection
404
404OP8mo ago
Hmm, I understand. I'll contact the neon support. actually I realised that it waits a long time after any drizzle code, and give this error
404
404OP8mo ago
and if i change pool to https my connection, gives this error
No description
Angelelz
Angelelz8mo ago
Try to run a query with the neon connection only, without drizzle and start troubleshooting from there
404
404OP7mo ago
okey i did neon example and works well // app.js const postgres = require('postgres'); require('dotenv').config(); let { PGHOST, PGDATABASE, PGUSER, PGPASSWORD, ENDPOINT_ID } = process.env; const sql = postgres({ host: PGHOST, database: PGDATABASE, username: PGUSER, password: PGPASSWORD, port: 5432, ssl: 'require', connection: { options: project=${ENDPOINT_ID}, }, }); async function getPgVersion() { const result = await sqlselect version(); console.log(result); } getPgVersion(); and my another drizzle nextjs app works well What could I have done wrong? I was using cloudflare warp to change my DNS and it was not working properly along with bun and drizzle because I left it on. I solved the problem by switching off the warp.
Angelelz
Angelelz7mo ago
No idea what that means but good deal!
Want results from more Discord servers?
Add your server