nextjs-mongodb-app
nextjs-mongodb-app copied to clipboard
Diference between Netlify and Vercel
I got a problem, when I deploy with the Netlify i need close the connection with the database, but when i use Vercel not need.
I noticed that at vercel, when I answer his request for everything, already at netlify if he has a callback he keeps running, so I need to close the bank.
Is this a problem at Netlify or just the way they work?
Sorry for the late response. Vercel does this thing and set context.callbackWaitsForEmptyEventLoop
to false
as recommended in this article https://docs.atlas.mongodb.com/best-practices-connecting-to-aws-lambda/. I do not know if Netlify does such a thing, and if they do not, you may run into problems when using database in serverless environment.
Are you using https://github.com/netlify/next-on-netlify? It may help to ask about context.callbackWaitsForEmptyEventLoop
there.