Next.js Discord

Discord Forum

Next.js, Google Cloud SQL, sequelize, and re-creating connections

Unanswered
Orinoco Crocodile posted this in #help-forum
Open in Discord
Orinoco CrocodileOP
I'm making a web app using google cloud resources, and I'm using a cloud SQL database for some of my storage. I've connected and query from it using sequelize. One of the issues I've noticed while editing my code while the local environment is running is, since the dev server restarts, it could possibly be creating a new connection to my cloud sql database, but it doesn't look like it's properly destroying the previous connection, so I just have connections stacking on top of each other and not being released properly until I hit the limit on the number of connections I can have to my cloud sql database. Has anyone encountered this issue before, and if so, how/were you able to remedy the situation at all? Or could it be something else I haven't looked at? Thank you!

0 Replies