How to Fix ‘Error 524’ on Cloudflare Server?
Cloudflare is a US-based company that specializes in providing internet security and other online services. Some of these services include DDoS Protection, CDNs, and Domain Name Services. It is a very popular option and is used by a lot of people. Quite recently, a lot of reports have been coming in where users are experiencing the “Error 524” on their servers.
What Causes the “Error 524” on Cloudflare Servers?
After receiving numerous reports from multiple users, we decided to investigate the issue and devised a set of solutions to fix it completely. Also, we looked into the reasons due to which it is triggered and listed them as follows.
- Long-Running Process: Error 524 indicates that Cloudflare succeded in making a TCP connection with the origin but the origin was unable to respond with an HTTP before the timeout limit was reached. This means that there isn’t a problem with Cloudflare and it is able to make a connection with the origin but the origin is exceeding the time limit of responding to the connection. Cloudflare only waits for 100 seconds before it pulls up this error, therefore, if the process that you are running is longer than that this error is triggered.
- Overload: In some cases, the server might be overloaded and limited by the hardware. If the CPU usage on the server is greater than normal it can cause a spike in loading times. This will, in turn, limit the server’s ability to complete a task and this error might be triggered.
Now that you have a basic understanding of the nature of the problem, we will move on towards the solutions. Make sure to implement these in the specific order in which they are presented to avoid conflict.
Solution 1: Check Resources
If this error is being triggered on your server it is recommended that you check the server’s resources for high usage. It is possible that the resource usage might be above normal due to which this error is being triggered. It is recommended that you either increase the hardware capabilities of the server or limit the processes running on it.
Solution 2: Move to Subdomain
If you regularly run processes which take longer than 100 seconds to complete, you can try to move these processes to a subdomain which isn’t proxied by Cloudflare’s DNS Application. This way the 100-second limitation will no longer apply to the process and it will load normally.
Note: It is also recommended to turn any VPS software off and test Railgun settings.