Connections not closed with nextJS

Hey @Il_Chi,

We have an updated guide that has better practices for handling MongoDB connections in a much more efficient way. You can read the article here: How to Integrate MongoDB Into Your Next.js App | MongoDB or view the preferred utility file here: https://github.com/vercel/next.js/blob/canary/examples/with-mongodb/util/mongodb.js. This will work much better.

Please give it a try and let me know if you experience further issues :slight_smile:

2 Likes