Error when submitting form : "The server requested closed the connection before the transaction was completed" (502)

Hello,

I have this problem when submitting a (form) on my website:
https://www.mywebsite.fr/
(the form is reachable by clicking on the button “Inscription” in the header)

Sometimes, some of my test users get a 502 error when redirecting to the action page, but not always: https://www.mywebsite.fr/merci/:
" Description: The server requested closed the connection before the transaction was completed."

When I submit the form, I make three things:

  • upload the data to Firebase
  • send a message to the user via a Netlify Function
  • submit to Netlify and send a notification by email via Netlify.

When the user gets this error, the first two operations get done right but not the last operation (submit to Netlify and send a notification by email via Netlify) and I can’t retrieve the form data in Netlify Forms section (it’s not sent).

Could it be a timeout problem? and if so, what can I do to resolve it?

Thanks a lot for your help,

David

After reading the documentation more carefully (https://docs.netlify.com/forms/setup/#limitations), I now suspect it’s a problem with the total size of the files uploaded…

1 Like

Thanks for coming back and letting us know! Should you encounter additional obstacles related to this, don’t hesitate to follow up!

Happy building :rocket: