JotForm is a free online form builder which helps you create online forms without writing a single line of code. No sign-up required.
We believe that if one user has a question, there could be more users who may have the same question. This is why many of our support forum threads are public and available to be searched and viewed. If you’d like help immediately, feel free to search for a similar question, or submit your question or concern.
502 Bad Gateway when uploading a lot of imagesAsked by FFS_user on August 30, 2016 at 09:30 PM
Our forms used to work but now are getting a 502 Bad Gateway error. This happens when the user uploads a lot of pics. Here's the form:
I cloned the form and the error still occurs when there are a lot of pics uploaded:
I even tried it on a simpler form and 502 error still occurs when a lot of pics are uploaded:
Our jotform cache was cleared as was my browser's before testing these. And no Google docs widget on our forms.
We're using the File Upload widget on all these forms.
Any ideas, especially since it was working fine before?
I cloned your form and tested on my side. I was able to upload up to 25 images and submit successfully. How long have you been experiencing this issue? Since, it might be a temporary situation.
Could you please also let us know which browser you are using?
If you have more questions, please let us know. We would be glad to assist you.
Can you try uploading up to the max limit (25MB)? Perhaps it's not the number of files but rather the total size. We intend to have large uploads.
It started happening a couple days ago.
Not sure what browser the clients are using but we were using Safari, Firefox and Chrome.
Your form's file upload field is actually set to have a max file size upload of 5000 which should translate to 4.88 MB.
If the total size of all the file uploads on that field is greater than 5000, then I guess that would explain the error you are getting? You can adjust the max file size there. Here's a guide that you can refer to: https://www.jotform.com/help/33-Changing-the-upload-size-limit
You are still having problems, could you please provide a screenshot of it? May we also know if the form embedded on a website page?
We'll wait for your response.
The total max file size would explain that. I thought it meant per file, so we could possible upload way more than 5MB. So does that field mean 5MB total for all uploads combined or does it mean 5MB total per file uploaded?
I tested it on the jotform site, not on our website. But error came up both ways.
The upload limit is for all files total uploaded through the field. If multiple uploads are enabled, it is a total for all the files added, not for each individual file.
I tested with a copy of one of your forms and was able to upload a 200mb+ file without issue:
As far as I can tell, if you increase the upload size limit, larger files and multiple files should go through.
That would seem to be the culprit but that didn't help either. I upped the limit to 200MB on all forms but still getting the 502 (even after clearing jotform and browser caches). I uploaded 18 files of 1.4MB each for a total of 25MB. That shouldn't be too heavy. The submissions are making it to jotform submissions area, though. I even created a new form with just email and image upload fields but still getting the error.
Not sure what I'm doing wrong or what more I could do. ????
Thanks for reporting. I tried to upload a number of images in your form with random sizes and I can't reproduce the problem like my colleague.
Below are my tests:
Often, bad gateway errors are caused by issues between servers but it may also have connection with your network. Errors like this are extremely temporary so I would suggest to try it again on your side. If the problem continues, try to troubleshoot with the following.
1. Start a new browser session, close the form and open it again.
2. Clear your browser's cache and cookies (you can skip this steps if you've performed this already)
3. Start your browser in safe mode. It is known that browser add-ons, extensions might affect the upload progress.
4. Try another browser. Perhaps it's also a browser specific issue on your side, try other browsers and check.
5. If you are using browser proxies, try to disable it.
6. Last but not least, try to restart your networking equipment like routers and etc. See if this helps.
I appreciate your detailed response, however even after doing everything on your list even restarting the network but I'm still getting the 502.
Hopefully this is just on my side and is temporary but a couple others have gotten the error.
Since none of our other users are experiencing this issue, hopefully, it's temporary. We suggest to monitor this for now and let us know here if you continue to encounter the problem after a certain time so we can forward this to our developers for further investigation.
That might be the best way to do it. Hopefully it's temporary. I'll let you know if it continues. Thanks again for all your help.
This doesn't appear to be a temporary issue, as clients are still getting the error; it's not just me or my partners. It's making jotform unusable on the site.
The upload widgets that store images on jotform all get the error however the kloudless widget and the uploadcare widget do not get the error, most likely since they're storing the images on their sites. We'd rather not use an inferior widget (or pay for one) so it'd be best if your widget worked for us.
I know you can't troubleshoot if you can't reproduce the error but do you have any other ideas???
We are sorry for the issue you have been experiencing.
I'm forwarding it to our developers for further inspection. Once they find out what causes it and find a solution, they will update you under this thread.
In the meantime, If you have other questions, please feel free to contact us. We would be pleased to assist you.
Since you can reproduce the bug, we'd like your help in doing so, and that will take us closer to a solution.
Please inspect the page (before you begin uploading the images) and take screenshot - We'd like to see from where the 502 errors are originating.
To inspect the page,
1. Right click on the fully loaded form and select "inspect" - it'll be similar on most browsers
2. The inspector panel will open either to the side or below. It should have a console tab somewhere (shown on the illustration). Click it to reveal the error messages the page (the form) is exhibiting
3. Take a screenshot when the 502 error is shown, and share the screenshot with us. You can email it to me if you'd like (I've responded to an email about this thread).
If you're comfortable with the inspector, you can just copy all the logs and paste them in your response.