As you can see below, a 524 error is not related to security, but to the origin server taking too long to finish its job and send the response to Cloudflare servers. Please review the tips in the link below and try to fix the issue at the origin server.
If fixing your server is not possible at all, your options are pausing Cloudflare (disables Cloudflare for the whole zone while in effect) or setting the domain or subdomain to DNS only (). Neither of these two options are ideal, since they will in effect turn Cloudflare protection off for a good chunk (if not all) of your website.
A 524 error indicates that Cloudflare made a successful TCP connection to the origin web server, but the origin did not reply with an HTTP response before the connection timed out. Review the suggestions in this Community Tip for troubleshooting ideas.