App logs showing pgBouncer errors
I am hosting a Next.js app on a Node.js server which is connected to pgBouncer and a Postgres DB.
I notice these errors in my logs, is this anything to be cooncerned about? I'm not sure what these mean.
2 Replies
Project ID:
c0958e3e-4cd8-4f89-9376-7c4003820f57
c0958e3e-4cd8-4f89-9376-7c4003820f57
Last night I added
node-cron
to run scheduled prisma queries to clean up the db every 5 minutes. It looks like that may have been the cause for some of those connection and login pgBouncer errors in the screenshot. I had set a custom start command in app settings for bun run start:prod
. Since I removed it pgBouncer is just logging stats.
Here are the package.json scripts:
If node-cron was the issue here connecting to prisma, are there any known issues with pgBouncer/prisma/node-cron that would cause those initial log errors?
Possiblly an issue with prisma keeping the connections open too long, will test adding timeouts and prisma.$disconnect()
to close connection after queries