Cloudflare Bad Gateway 502 Error

Myself and my users often work with Cloudflare Bad Gateway 502 error . Trying to figure out what goes wrong is difficult because Cloudflare blames the hosting company and the hosting company blames Cloudflare. A typical situation when using Cloudflare.

I noticed that nothing is happening. The host receives the request and processes the request just fine, but sometimes it takes a little longer than usual. But Cloudflare cannot wait, and instead generates a Bad Gateway error, and the script actually still works.

I noticed this behavior when performing heavy internal tasks (for example, creating +50 PDF files). My users notice this when they try to upload an image (which often runs the override task).

Is there a way to set up my server so Cloudflare knows that the request is still being processed? Or should I just split Cloudflare as a whole?

+6
source share
1 answer

The culprit was Railgun. After disabling Railgun (in the Cloudflare control panel), Bad Gateway 502 errors immediately disappeared.

+5
source

All Articles