Fix Cloudflare Error 524

Cloudflare-Error-524

The main reason you face the error 524 is when you don’t receive any HTTP response even if the Cloudflare is connected to the webserver successfully. The Error 524: A Timeout Occurred usually indicates some sort of server error which can be due to a script miss-configured or due to a crash in a web application’s processes.

Ensure your server is not overpopulated, as it might struggle to keep track of all the processes running at any given time. Now let’s see the steps to fix Cloudflare error 524;

Webpage Refresh:

At first try refreshing the page, or close the browser and reload it, most of the time it could help. If that doesn’t work then before moving to the next step clear your cache & cookies, as they might interrupt your page from loading. If the error 524” occurs as a temporary problem then updating your Web page will allow you to connect to the server.

Re-installing

Try re-installing the application you are using and also check the server’s traffic to ensure if other users are experiencing the same problem or not and if that is not causing the error, then perform the next step.

Server Load Check

Excessive server load triggers Error 524: A Timeout Occurred. Run the below command to check the server performance.

top –c

Check for resources that are demanding high CPU and bandwidth usage and terminate those applications that run too many procedures simultaneously.

Note: This will interrupt your end-user activity for a short time but will help your server to accept more traffic.

Run the MySQL command to check if too many sleep connections are stacking up.

show full processlist;

If your server is loaded then this can re-occur, and your try various methods given.

Upgrade Your System

If a Timeout Error 524 occurs on your server, it is recommended to check the server’s hardware is in good working order. This error can occur as a result of excessive use of hardware resources such as memory and CPU.

Error code 524 may indicate that your web server hardware needs to be upgraded. To avoid the Cloudflare error, you should be able to keep loading times under 100 seconds with modern equipment.

Evaluate Your Port 80 Traffic

Your website should be able to handle traffic spikes under normal conditions. However, error 524 indicates that you are experiencing unusual traffic.

Anything from a faulty script to a DDoS attack could be causing your server to become overloaded with HTTP requests. Using this server command, you can monitor IP address requests to your site:

netstat -an | grep 80

If you notice suspicious IP addresses spamming your server, use the command to block them.

iptables -A INPUT -s ###.##.##.### -j DROP

Remember to restart Apache as well:

systemctlhttpd restart

Monitor your HTTP traffic on a regular basis to ensure you’re not being spammed and that your web server’s bandwidth can handle the increased traffic on your site.

You may also be able to set up automated alerts to notify you about long-running activity spikes or suspicious connections, depending on your hosting provider.

Shift to a subdomain

If you are not experiencing a DDoS attack or another type of external service interruption and have identified the culprit, you can avoid a Timeout Error 524 by moving the processes to a subdomain. 

Subdomains can be configured outside of the Cloudflare DNS app. These “grey clouded” domains can run processes in the background and send updates to the server while the HTTP connection is closed.

It allows Cloudflare to handle incoming traffic requests while your web server handles time-consuming processes independently.

Change Your PHP Configuration

If your web server is set up to run PHP scripts, you can set the max_execution_time variable in your php.ini file to whatever time you want. Load times for long-running scripts are commonly extended to 2 minutes. A slight increase from the default 100 seconds to 120 seconds is frequently enough extra time to allow PHP scripts to run before the 524 error occurs.

Contact Your Hosting Provider

If you are still stuck with the above step, then contact your host. If there is a problem at your host’s data center, Error 524 may appear for reasons beyond your control. If your host’s data center experiences a problem, Error 524 may appear for reasons beyond your control. Inform them about the error code, the time zone in which the problem occurred, and the URL that generated the error.

This assists them in identifying and resolving the problem as quickly as possible. Hope this was helpful in fixing Cloudflare error 524. For tech, assistance contact us and resolve errors on spot.

To get more updates you can follow us on Facebook, Twitter, LinkedIn

Subscribe to get free blog content to your Inbox