Keep randomly getting 502 bad gateway when uploading files

Does anyone know why this is happening and how to fix it
No description
20 Replies
KaseToatz
KaseToatzOP12mo ago
the logs for both nginx and the application handling the uploads are empty so it seems the request doesnt even reach the origin server (how do i verify this?) since there is a 100mb limit the frontend (javascript) puts the files into chunks and uploads every chunk to the backend after a few request i randomly get these 502 bad gateways usually when uploading large files but it doesnt always happen
Erisa
Erisa12mo ago
Hi - these are documented here https://developers.cloudflare.com/support/troubleshooting/cloudflare-errors/troubleshooting-cloudflare-5xx-errors/#502504-from-cloudflare They typically indicate Cloudflare issues, so you need to collect the * Time and timezone * URL that resulted in the error * Output from browsing to <YOUR_DOMAIN>/cdn-cgi/trace and then, if you can, open a Support Ticket with those details
KaseToatz
KaseToatzOP12mo ago
yes ive checked that url but the problem is the error isnt bound to a certain url it sometimes happens with uploading so its very hard to debug but its only with uploading so I really dont understand how this can be a cloudflare issue but i havent got any errors on my side
Erisa
Erisa12mo ago
Uploads are buffered at Cloudflare before being sent to the origin, and that specific error almost always means an internal error ocurred within Cloudflare before the request ever reached your server
but the problem is the error isnt bound to a certain url it sometimes happens with uploading so its very hard to debug
Understood - so the URLin this case is used by us to search logs on our end so helps to have at least one that it happened on along with the corresponding timestamp. For an upload this would be the URLthat the upload request is being sent to
KaseToatz
KaseToatzOP12mo ago
alright ill open a support ticket thanks for the help
Erisa
Erisa12mo ago
The documentation says to contact support because this isn't an error that you can debug yourself, it's all on us No problem and sorry you're having issues
KaseToatz
KaseToatzOP12mo ago
wait so im at the support ticket in the cloudflare dashboard but theres nowhere where i can enter the full uri for the error just the domain
KaseToatz
KaseToatzOP12mo ago
No description
Erisa
Erisa12mo ago
You can add it in the body of the ticket later when you click to add more details
KaseToatz
KaseToatzOP12mo ago
wait i think im on the wrong page for this because it just redirects me to cloudflare community
KaseToatz
KaseToatzOP12mo ago
oh
No description
Erisa
Erisa12mo ago
It means, really annoyingly, that you're on a plan that doesn't have access to technical support, so we have to do this the hard way Admittedly I am not in the office currently, so @Peps can you help escalate this? If you are able to post on the community that would help speed things up since it's linked to your account - you don't have to provide all the details there if you don't want them public, just the core issue (like you did here)
KaseToatz
KaseToatzOP12mo ago
alright so I make a community post describing my issue?
Erisa
Erisa12mo ago
Correct
KaseToatz
KaseToatzOP12mo ago
alright
Peps
Peps12mo ago
Send the link to the community post in this thread once you have it, and we'll escalate it
KaseToatz
KaseToatzOP12mo ago
thank you will do
KaseToatz
KaseToatzOP12mo ago
Cloudflare Community
Randomly occuring 502 Bad Gateway errors
I keep getting Bad Gateway errors when uploading large files on cloudflare, the error received is the black and white page that just says “502 Bad Gateway” and “cloudflare” which according to https://developers.cloudflare.com/support/troubleshooting/cloudflare-errors/troubleshooting-cloudflare-5xx-errors indicates this is an issue on cloudflares...
Peps
Peps12mo ago
👍 The thread will be checked and responded to soon by Cloudflare's support
KaseToatz
KaseToatzOP12mo ago
thank you so much
Want results from more Discord servers?
Add your server