-
Notifications
You must be signed in to change notification settings - Fork 87
Netlify function can’t resolve api fetch pending state and times out #378
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
Comments
@felixhaeberle hey felix! can you try something for me? can you |
Thanks! 🎉 It worked. Is this something we can expect to be merged in the Next.js Essentials plugin by default? What do I have to do in order to get this working long-term? Thanks for your advice. 🙏 |
yay thanks so much for trying that out!!! i'm gonna merge that branch now and release a new version of the plugin. i'll circle back here when i'm done :D |
@felixhaeberle it's out now as 3.4.0! will close this issue per that release but pls do let us know if you have any other timeout issues!!! |
* chore: annotate all skipped tests * chore: generate test config from JSON file * chore: generate JSON results * chore: more annotation * chore: add more test explanations * chore: more test config * chore: more test config * chore: use reason --------- Co-authored-by: Michal Piechowiak <[email protected]>
My netlify site url: https://www.getmelo.io/
Hey, Felix here! I deployed my code to Netlify with a Heroku Postgres DB, but get really slow response time from a very simple subscription form only checking with .findUnique if the email is there and after .create it with the prisma client. From localhost to prod DB it only takes 1-2s, but from Netlify it takes about 10s to write the mail to the database. Where can be the bottleneck?
I did further research and found that Netlify can’t resolve the api fetch and is staying in “pending” state for 10s until it times out, but giving the correct database response and inserts the data.
I’m using
@prisma/client@~2.19.0
withprisma@~2.19.0
andnexus-plugin-prisma@~0.33.0
The inserting logic is:
together with:
That's my
next.config.js
Expected behavior
No timeout like in localhost, instant resolving of the db write.
Versions
If you're using the CLI to build
I'm not using a netlify.toml
The text was updated successfully, but these errors were encountered: