Error 524 and excluding rule

Hey
I’m trying to exclude one of the URLs on my site, (it’s a corn job URL and we need it to run, it’s a long process that would run once per hour). But we’re always getting “524”.

I tried to use the guide here

But it doesn’t work.

This is what done:

Any idea how can I let this URL to run without getting 524?

Based on the topic category that you assigned and the questions you asked, I don’t see anything related to Cloudflare Access. This can make people confusing.

image

By the way, does your cron job only respond after the task is completed?

Sorry for that…
Regarding your question, yes the “job” need to be done once the file is loaded.

Your cron job could be already running after you send the request, but because Cloudflare has a 100 second timeout, if there’s no respond from your server within 100 seconds, Cloudflare will simply return Error 524 to you.

If you require a response to be returned from your server to read the job status, then there’s nothing we can help with (unless you are using Enterprise plan which can increase the timeout to 600 seconds) except unproxying the DNS record. Otherwise, you can simply ignore it.

is there any way to exclude cloudflare from this specific page?

No, other than unproxy the whole subdomain.

Meaning the CNAME or the A name?

(I changed the A name now, but waiting for your reply)

Yes, :grey: DNS only.

For A or Cname?

The main thing is which subdomain you are hitting while accessing the URL.

If it is example.com, then :grey: the A record. If it is www.example.com, then :grey: the CNAME record (based on the screenshot that you posted)

Thanks a lot!!!
What does it mean now after I did it?
My WHOLE site is not secured? or just the “IP” is accessible?

That means that particular subdomain is no longer protected by Cloudflare because everything will be resolved to your server directly - hence bypassing Cloudflare.

cache as well?

Where are you running this cron job from? There are ways to trigger it directly on the server without having to go through Cloudflare.

I’m using CloudWays, and their interface, but the file itself that need to run every 1/2 minutes is on my server, ofcourse.

With CloudWays, you should have shell access to your server. You can create a cronjob something like this:
15 * * * * /usr/bin/curl https://example.com/synBLAHate.php --connect-to ::123.123.123.123 >/dev/null 2>&1

This runs the job at 15 minutes after every hour. And replace the 123.123.123.123 with the actual IP address of your server so it connects directly.

I suggest you first test it manually from the command line:
/usr/bin/curl https://example.com/synBLAHate.php --connect-to ::123.123.123.123

Sometimes I end the cronjob line with >/tmp/cron.txt 2>&1 instead so I can periodically look at that .txt file to see if the job is working properly.

1 Like

I like to use --resolve instead of --connect-to :laughing:

I started with --resolve, but connect-to looked like easier syntax. I think because it let me not have to specify the port.

1 Like