发布于 2015-09-03 15:52:58 | 335 次阅读 | 评论: 0 | 来源: 网络整理

ngx_http_upstream_keepalive_module长连接超时设置

增加nginx后端长连接的超时支持:

    upstream backend {
        server 127.0.0.1:8080;
        keepalive 32;
        keepalive_timeout 30s; # 设置后端连接的最大idle时间为30s
    }
指令
Syntax: keepalive_timeout time
Default: -
Context: upstream

该指令设置后端长连接的最大空闲超时时间,参数的时间单位可以是s(秒),ms(毫秒),m(分钟)。默认时间单位是秒。

最新网友评论  共有(0)条评论 发布评论 返回顶部

Copyright © 2007-2017 PHPERZ.COM All Rights Reserved   冀ICP备14009818号  版权声明  广告服务