Skip to content
This repository has been archived by the owner on Apr 22, 2022. It is now read-only.

This guide will show you how to fix Cloudflare's Error 524 (A timeout occurred)

Notifications You must be signed in to change notification settings

marcialpaulg/Fixing-Cloudflare-Error-524

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 

Repository files navigation

Fixing Cloudflare Error 524

This guide will show you how to fix Cloudflare's Error 524 (A timeout occurred)

Explanation

A 524 error states that Cloudflare was able to make a TCP connection to the origin, but the origin did not reply with a HTTP response before the connection timed out.

Cloudflare will typically wait for a HTTP response from your server for 100 seconds. If no response(<8KB) is sent by your server in that time, Cloudflare will close the connection and serve a 524 error page.

This error is commonly caused by a long-running process on the origin server, such as a PHP application or a database query which the web server must wait on before responding to a request.

Fixing

To fix this, you need to send a >8KB data earlier than your "long-running process".

"Long-running process" Samples

see PHP CODE

Fixing Samples

see PHP CODE FIX 1 PHP CODE FIX 2

Author: Marcial Paul G. [email protected]

Not working

Option #1: Turn off any compression that may minify the response of the file (gzip/deflate/br in apache/nginx)

Option #2: increment $spacer_size variable by 1 until it works

About

This guide will show you how to fix Cloudflare's Error 524 (A timeout occurred)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages