https://su.baidu.com/helps/index.html#/4/5a61e4b5b34f697f13234a5b

Error524 源站处理超时

更新时间:2018-01-19 20:29:41

出现524错误,说明我们节点可以连接到源站,但是源站响应请求消耗的时间太长导致超时;这个错误通常是源站运行一个大任务导致的,如php应用程序或数据库查询,这样web服务器必须在任务完成前进行等待。请检查一下您源站的运行情况!

https://support.cloudflare.com/hc/en-us/articles/200171926-Error-524-A-timeout-occurred

Overview

Error 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.

Typically, Cloudflare waits 100 seconds for an HTTP response. If the origin doesn't respond in that time, Cloudflare closes the connection and serves Error 524.

Common causes

The most common causes for Error 524 are:

  • A long-running process on the origin web server, such as a slow application or database query, for which the web server must wait before it can respond to a request
  • An overloaded origin web server

Troubleshoot Error 524

Below, you will find several suggestions for trying to resolve Error 524.

Check origin server resources

Check the origin server's available resources, including CPU and RAM, as well as overall traffic levels. Low memory or a high CPU load could signal a resource problem.

If you're unable to verify these resources on your own, check with your host or a system administrator.

Migrate long-running processes

If you regularly run HTTP requests that take over 100 seconds to complete (for example large data exports), consider moving those long-running processes to a subdomain that is not proxied by Cloudflare. That subdomain would have the orange cloud icon toggled to grey in the Cloudflare DNS Settings. Note that you cannot use a Page Rule to circumvent Error 524.

Adjust Railgun settings

If you use Cloudflare Railgun, Error 524 can also manifest if the time specified by lan.timeout is exceeded.  lan.timeout defaults to 30 seconds, so if you're seeing 524 errors with Railgun enabled, try setting this value higher.

Log origin server response time

If you have modify access on the origin web server configuration files, you can log how long the server took to respond to a request by modifying the log format.

Most web servers store the response time as a variable that you can add to your log configuration file.

Apache declares logging format in the LogFormat or CustomLog directives, depending on whether you are making a global change or just for specific virtual hosts.

Response time is stored as the %T variable. See the Apache mod_log_config documentation.

For Nginx, you can modify the log_format directive. Response time is stored as the $request_time variable. See the logging documentation.

Measure response time with cURL

You can use cURL in the Terminal window (on MacOS and Linux) to measure how long a request takes to respond. cURL has a write-out flag which allows you to print specific information about a request using custom variables.  See the documentation.

You can use the %{time_connect} and %{time_starttransfer} variables to measure how long it takes to connect to the origin server, as well as the time it takes for the origin to return a response (i.e., time to first byte), using the following command:

curl -vso /dev/null -w "Connect: %{time_connect} \n TTFB: %{time_starttransfer} \n 
Total time: %{time_total} \n" http://www.example.com

You can send this request directly to your origin server using the server's IP address and passing a host header:

curl -vso /dev/null -w "Connect: %{time_connect} \n TTFB: %{time_starttransfer} \n Total time: %{time_total} \n"
-H ‘Host: www.example.com’ <http://1.2.3.4

At the bottom of the output for these commands, you’ll see three fields, similar to:

Connect: 0.154
TTFB: 1.734
Total time: 1.784

Connect indicates how long it took to establish a TCP connection to the server. This should a relatively low value.

TTFB indicates the time it took to generate a response.

If you see the response taking longer than 100 seconds, you know that it would trigger an Error  524 via Cloudflare.

Error524 源站处理超时 Error 524: A timeout occurred的更多相关文章

  1. IntelliJ IDEA连接cvs超时Error refreshing view: Timeout while trying to connect to host

    在使用IntelliJ IDEA连接cvs的时候,有时会报超时错误: Error refreshing view: Timeout while trying to connect to host: 1 ...

  2. centos7内网源站建设

    centos7内网源站建设 1.部署环境: 系统:Centos7 x86_64 应用服务:nginx.createrepo.reposync 镜像源:https://mirrors.aliyun.co ...

  3. 脚本检测CDN节点资源是否与源站资源一致

    需求: 1.所有要检测的资源url放到一个单独文件中 2.检测cdn节点资源大小与源站文件大小是否一致 3.随机抽查几个资源,检查md5sum是否一致 4.使用多线程,可配置线程数 代码目录: hex ...

  4. 如何绕过CDN找源站ip?

    这是一个总结帖,查了一下关于这个问题的国内外大大小小的网站,对其中说的一些方法总结归纳形成,里面具体发现ip的方法不是原创,所有参考的原贴都也贴在了后面,大家可以自行看看原贴. 首先,先要明确一个概念 ...

  5. f5源站获取http/https访问的真实源IP解决方案

    1.背景 F5负载均衡设备,很多场景下需要采用旁挂的方式部署.为了保证访问到源站的数据流的request和response的TCP路径一致,f5采用了snat机制.但是这样导致源站上看到的来源IP都是 ...

  6. git源站安装

    ##下载源站 wget https://www.kernel.org/pub/software/scm/git/git-2.15.0.tar.xz ##安装依赖组件 yum install curl- ...

  7. 为什么IP检验和发现错误直接丢弃而不是要求源站重发

    纠错控制由上层(传输层)执行IP首部中的源站地址也可能出错,请错误的源地址重传数据报是 没有意义的

  8. 镜像回源主要用于无缝迁移数据到OSS,即服务已经在自己建立的源站或者在其他云产品上运行,需要迁移到OSS上,但是又不能停止服务,此时可利用镜像回写功能实现。

    管理回源设置_管理文件_开发指南_对象存储 OSS-阿里云 https://help.aliyun.com/document_detail/31865.html 通过回源设置,对于获取数据的请求以多种 ...

  9. wl18xx module crash with "wlcore: ERROR ELP wakeup timeout!"

    [ 111.322967] wlcore: ERROR ELP wakeup timeout![ 111.327636] ------------[ cut here ]------------[ 1 ...

随机推荐

  1. ATOM入坑必备插件

    Atom作为Javascript/CSS/HTML等前端编辑器利器,其强大功能依靠各种插件,以下是笔者在入坑阶段,精挑细选总结出的必不可少的插件,熟悉运用这些插件,一定成吨提高生产效率.安装这些插件只 ...

  2. httpd安装和配置(cgi、wsgi)

    参考:http://webpy.org/cookbook/mod_wsgi-apache.zh-cn 一.yum方式安装: 1.yum install httpd 输入y后继续. 2.看到一下类似的返 ...

  3. BZOJ 3881 COCI 2015 Divljak

    题面 Description Tom有n个字符串S1,S2...Sn,Jerry有一个字符串集合T,一开始集合是空的. 接下来会发生q个操作,操作有两种形式: "1 P",Jerr ...

  4. linux grep 搜索查找

    查找关键字在哪些文件夹中的哪些文件中出现(只列出文件名称): grep -l 15386257298 */* 查找关键字在哪些文件夹中的哪些文件中出现(列出文件名称+关键字): grep -o 153 ...

  5. mac 下bash命令

    可以一行写一条命令 nginx uwsgi /Users/***/djangoprojects/bpmTest/uwsgi.ini 将上述命令保存成**.sh文件 这样,然后bash ***.sh 实 ...

  6. http各类攻击及tcpcopy工具

    1.专业的还得ixia.Spirent TestCenter等软硬件一体的 2.一般的使用软件的,安装在linux上使用 参考: 1.http://blog.csdn.net/wuzhimang/ar ...

  7. sublime text常用快捷键(转)

    选择一个选中项的下一个匹配项: ctrl+d 把光标放在一个单词上,按下ctrl+ D,将选择这个单词.一直按住ctrl且按D多次,将选择当前选中项的下一个匹配项.通过按住ctrl,再按D三次,将选择 ...

  8. c 数组做为形參时 该參数退化为指针

    当数组做为函数的形參的时候,该參数退化为指针,而且是无法直接求得数组的大小. 传数组给一个函数.数组类型自己主动转换为指针类型,因而传的实际是地址. void func(int array[10]) ...

  9. BZOJ 1878 SDOI2009 HH的项链 树状数组/莫队算法

    题目大意:给定一个序列.求一个区间内有多少个不同的数 正解是树状数组 将全部区间依照左端点排序 然后每次仅仅统计左端点開始的每种颜色的第一个数即可了 用树状数组维护 我写的是莫队算法 莫队明显能搞 m ...

  10. centos 7 mariadb 安装

    yum install -y mariadb mariadb-server systemctl start mariadb systemctl enable mariadb #初始化 mysql_se ...