Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Diference between Netlify and Vercel #97

Open
joaogn opened this issue Aug 22, 2020 · 2 comments
Open

Diference between Netlify and Vercel #97

joaogn opened this issue Aug 22, 2020 · 2 comments

Comments

@joaogn
Copy link

joaogn commented Aug 22, 2020

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?

@hoangvvo
Copy link
Owner

hoangvvo commented Sep 5, 2020

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.

@hoangvvo
Copy link
Owner

hoangvvo commented Sep 5, 2020

Are you using https://github.com/netlify/next-on-netlify? It may help to ask about context.callbackWaitsForEmptyEventLoop there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants