nginx常用超时设置
客户度连接nginx超时, 建议5s内
接收客户端header超时, 默认60s, 如果60s内没有收到完整的http包头, 返回408
Syntax: client_header_timeout time;
Default:
client_header_timeout 60s;
Context: http, server
Defines a timeout for reading client request header. If a client does not transmit the entire header within this time,
the (Request Time-out) error is returned to the client.
接收客户端body超时, 默认60s, 如果连续的60s内没有收到客户端的1个字节, 返回408
Syntax: client_body_timeout time;
Default:
client_body_timeout 60s;
Context: http, server, location
Defines a timeout for reading client request body. The timeout is set only for a period between two successive read operations, not for the transmission of the whole request body.
If a client does not transmit anything within this time,
the (Request Time-out) error is returned to the client.
keepalive时间,默认75s,通常keepalive_timeout应该比client_body_timeout大
Syntax: keepalive_timeout timeout [header_timeout];
Default:
keepalive_timeout 75s;
Context: http, server, location
The first parameter sets a timeout during which a keep-alive client connection will stay open on the server side. The zero value disables keep-alive client connections.
The optional second parameter sets a value in the “Keep-Alive: timeout=time” response header field. Two parameters may differ.
The “Keep-Alive: timeout=time” header field is recognized by Mozilla and Konqueror. MSIE closes keep-alive connections by itself in about 60 seconds.
可以理解为TCP连接关闭时的SO_LINGER延时设置,默认5s
Syntax: lingering_timeout time;
Default:
lingering_timeout 5s;
Context: http, server, location
When lingering_close is in effect, this directive specifies the maximum waiting time for more client data to arrive. If data are not received during this time,
the connection is closed. Otherwise, the data are read and ignored, and nginx starts waiting for more data again.
The “wait-read-ignore” cycle is repeated, but no longer than specified by the lingering_time directive.
域名解析超时,默认30s
Syntax: resolver_timeout time;
Default:
resolver_timeout 30s;
Context: http, server, location
Sets a timeout for name resolution, for example: resolver_timeout 5s;
发送数据至客户端超时, 默认60s, 如果连续的60s内客户端没有收到1个字节, 连接关闭
Syntax: send_timeout time;
Default:
send_timeout 60s;
Context: http, server, location
Sets a timeout for transmitting a response to the client. The timeout is set only between two successive write operations,
not for the transmission of the whole response. If the client does not receive anything within this time, the connection is closed.
nginx与upstream server的连接超时时间
Syntax: proxy_connect_timeout time;
Default:
proxy_connect_timeout 60s;
Context: http, server, location
Defines a timeout for establishing a connection with a proxied server. It should be noted that this timeout cannot usually exceed seconds.
nginx接收upstream server数据超时, 默认60s, 如果连续的60s内没有收到1个字节, 连接关闭
Syntax: proxy_read_timeout time;
Default:
proxy_read_timeout 60s;
Context: http, server, location
Defines a timeout for reading a response from the proxied server. The timeout is set only between two successive read operations,
not for the transmission of the whole response. If the proxied server does not transmit anything within this time, the connection is closed.
nginx发送数据至upstream server超时, 默认60s, 如果连续的60s内没有发送1个字节, 连接关闭
Syntax: proxy_send_timeout time;
Default:
proxy_send_timeout 60s;
Context: http, server, location
Sets a timeout for transmitting a request to the proxied server. The timeout is set only between two successive write operations,
not for the transmission of the whole request. If the proxied server does not receive anything.
转自:https://blog.csdn.net/xizaihui/article/details/53306496?utm_source=itdadao&utm_medium=referral
另参考:https://blog.csdn.net/achenyuan/article/details/79122894
nginx常用超时设置的更多相关文章
- nginx常用伪静态设置
nginx里使用伪静态是直接在nginx.conf 中写规则的,并不需要像apache要开启写模块(mod_rewrite)才能进行伪静态. nginx只需要打开nginx.conf配置文件,在ser ...
- flask nginx+uwsgi超时设置
最近使用uwsgi+nginx经常程序执行一般就跳转到nginx报错页面,查看停止时程序日志还在写,nginx报错upstream timeout排查怀疑是超时的问题 设置nginx uwsgi_co ...
- nginx常用参数设置
1)隐藏nginx header 版本号 使用curl -I http://www.10.0.3.46 会发现server那里显示版本号 在nginx.conf的http里添加参数server_tok ...
- nginx中的超时设置,请求超时、响应等待超时等
nginx比较强大,可以针对单个域名请求做出单个连接超时的配置. 比如些动态解释和静态解释可以根据业务的需求配置 proxy_connect_timeout :后端服务器连接的超时时间_发起握手等候响 ...
- nginx的重试机制以及nginx常用的超时配置说明
nginx的重试机制 现在对外服务的网站,很少只使用一个服务节点,而是部署多台服务器,上层通过一定机制保证容错和负载均衡. nginx就是常用的一种HTTP和反向代理服务器,支持容错和负载均衡. ng ...
- nginx中的超时设置
nginx使用proxy模块时,默认的读取超时时间是60s. 1. send_timeout syntax: send_timeout the time default: send_timeout 6 ...
- nginx常用的超时配置说明
client_header_timeout 语法 client_header_timeout time默认值 60s上下文 http server说明 指定等待client发送一个请求头的超时时间(例 ...
- Python脚本控制的WebDriver 常用操作 <二十八> 超时设置和cookie操作
超时设置 测试用例场景 webdriver中可以设置很多的超时时间 implicit_wait.识别对象时的超时时间.过了这个时间如果对象还没找到的话就会抛出异常 Python脚本 ff = webd ...
- Nginx常用配置实例(4)
Nginx作为一个HTTP服务器,在功能实现方面和性能方面都表现得非常卓越,完全可以与Apache相媲美,几乎可以实现Apache的所有功能,下面就介绍一些Nginx常用的配置实例,具体包含虚拟主机配 ...
随机推荐
- Mysql 高可用方案
1 mysql分布式数据库,如 mycat https://www.cnblogs.com/zzsdream/articles/6650690.html 2 读写分离,mysql主从复制+mysql ...
- SQL SERVER 的用户数,连接,连接池 license
SQL SERVER 理论上有32767个逻辑连接,SQL SERVER根据系统自行调配连接池. 首先 ,操作系统的用户数:即同时通过网络连接到这台电脑上面的用户限制,以5用户操作系统,搭建的文件服务 ...
- 【Scala】Scala-循环与遍历
Scala-循环与遍历 scala for 1000_百度搜索 Scala 2.8的for表达式:性能与运行顺序的改进 - 51CTO.COM scala List集合的用法 - CSDN博客
- 转:Logistic regression (逻辑回归) 概述
Logistic regression (逻辑回归)是当前业界比较常用的机器学习方法,用于估计某种事物的可能性.比如某用户购买某商品的可能性,某病人患有某种疾病的可能性,以及某广告被用户点击的可能性等 ...
- javascript计算字符串长度
javascript计算字符串长度 学习了:https://blog.csdn.net/u012934325/article/details/75214847 function getByteLen( ...
- unity3d shader 学习
[浅墨Unity3D Shader编程] 着色器参考 [Unity Shaders]
- Tushare数据的绘图操作
1.在代码里调试学习实在费劲,可以把数据取到df里,在交互界面里慢慢调试 2.柱状图 绘制柱状图,默认情况下乱,数据太密了 改用曲线图
- sourceTree 基础使用
https://www.cnblogs.com/tian-xie/p/6264104.html
- Redis 操作数据
展现最新数据 Web应用常常要展现最新数据,就会根据时间对数据排序: SELECT * FROM foo WHERE ... ORDER BY time DESC LIMIT 10 随着数据的增加,问 ...
- SpringBoot添加对Mybatis分页插件PageHelper的支持
1.修改maven配置文件pom.xml,添加对pageHelper的支持: <!--pagehelper--> <dependency> <groupId>com ...