Randomly get 502 Error

What is the name of the domain?

api-dashboard-clone.learnhub.my.id

What is the error number?

502

What is the error message?

Bad gateway Error code 502

What is the issue you’re encountering

everytime we upload, randomly return with 502 error and return the preview from the cloudflare, on our side there is no log that the api triggered into our server. the file size is under 1MB

What steps have you taken to resolve the issue?

restarting everything on our kubernetes services.
also please respond! this is our second post on the same problem, its already 19 days and no reply or any info related to the fix for us.

What are the steps to reproduce the issue?

postman api call

Screenshot of the error

Hi @motio.learn,

Have you looked at our Troubleshooting Cloudflare 5XX errors | Cloudflare Support docs?

Cloudflare returns an Cloudflare-branded HTTP 502 or 504 error when your origin web server responds with a standard HTTP 502 bad gateway or 504 gateway timeout error. Contact your hosting provider to troubleshoot these common causes at your origin web server:

  • Ensure the origin server responds to requests for the hostname and domain within the visitor’s URL that generated the 502 or 504 error.
  • Investigate excessive server loads, crashes, or network failures.
  • Identify applications or services that timed out or were blocked.

Yes, we read the troubleshoot docs and after some test run, we found out yesterday, that our ingress controller has returning error that our upstream suddenly closing but the file is uploaded even when the 502 triggered. Also, we got late news that our server is overloaded somehow with the stuck evicted pods.

Thank you for the response.