next.js
86dbcbea - fix: Prevent MongoDB client promise being cached (#66977)

Commit
1 year ago
fix: Prevent MongoDB client promise being cached (#66977) ### What? Update to [examples/with-mongodb](https://github.com/vercel/next.js/tree/canary/examples/with-mongodb) to incorporate fix from the MongoDB team. This should prevent intermittent serverless function timeouts due to cached promise. ### Why? Vercel users reported intermittent 500 errors when connecting to their MongoDB Atlas clusters in production environments. Full bug report: [NODE-6179](https://jira.mongodb.org/browse/NODE-6179) Related issues: - [10671](https://github.com/vercel/vercel/issues/10671) - [5708](https://github.com/orgs/vercel/discussions/5708) - [4297](https://github.com/orgs/vercel/discussions/4297) ### How? Solution by @baileympearson – thank you 🖤 [View commit](https://github.com/mongodb-developer/nextjs-with-mongodb/commit/c08bc96353f3d921766ece2ab2e9c4c647e398c7) in `mongodb-developer/nextjs-with-mongodb` --- - [x] The "examples guidelines" are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md) - [x] Make sure the linting passes by running `pnpm build && pnpm lint`. [See linting docs](https://github.com/vercel/next.js/blob/canary/contributing/repository/linting.md).
Author
Parents
Loading