Opened 4 years ago

Closed 4 years ago

#652 closed task (invalid)

after use spdy keepalive_timeout always 180000

Reported by: tom8888889@… Owned by:
Priority: critical Milestone: 1.7
Component: nginx-core Version: 1.7.x
Keywords: spdy Cc:
uname -a: Linux ubuntu 3.8.0-29-generic #42~precise1-Ubuntu SMP Wed Aug 14 16:19:23 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
nginx -V: nginx version: nginx/1.7.7 built by gcc 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5) TLS SNI support enabled configure arguments: --prefix=/usr/local/nginx-1.6.2.1 --with-http_spdy_module --with-http_ssl_module --with-debug

Description

I add some debug in ngx_http_spdy_module.c

it output

nginx: ngx_conf_merge_msec_value conf -1 prev -1 NGX_CONF_UNSET_MSEC -1 default 30000
nginx: ngx_conf_merge_msec_value conf -1 prev -1 NGX_CONF_UNSET_MSEC -1 default 180000

diff --git a/src/http/ngx_http_spdy_module.c b/src/http/ngx_http_spdy_module.c
index 5178a36..efc51d2 100644
--- a/src/http/ngx_http_spdy_module.c
+++ b/src/http/ngx_http_spdy_module.c
@@ -295,8 +295,11 @@ ngx_http_spdy_merge_srv_conf(ngx_conf_t *cf, void *parent, void *child)

ngx_conf_merge_uint_value(conf->streams_index_mask,

prev->streams_index_mask, 32 - 1);

+ ngx_log_stderr(0, "recv_timeout conf %d prev %d",conf->recv_timeout,prev->recv_timeout);

ngx_conf_merge_msec_value(conf->recv_timeout,

prev->recv_timeout, 30000);

+
+ ngx_log_stderr(0, "keepalive_timeout conf %d prev %d",conf->keepalive_timeout,prev->keepalive_timeout);

ngx_conf_merge_msec_value(conf->keepalive_timeout,

prev->keepalive_timeout, 180000);

nginx.conf

server {

listen 443 ssl spdy;
server_name vm.local.anjuke.com;

keepalive_timeout 123;
ssl_certificate /home/wbsong/cert/ia.crt;
ssl_certificate_key /home/wbsong/cert/ia.key;

ssl_session_cache shared:SSL:20m;
ssl_session_timeout 1000m;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;

#ssl_ciphers ECDH-ECDSA-AES128-SHA;
ssl_prefer_server_ciphers on;
add_header Alternate-Protocol 443:npn-spdy/3;

location ~ \.php$ {

fastcgi_pass unix:/data1/logs/php-fpm/php-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /home/wbsong/projects/self/test/$fastcgi_script_name;
include fastcgi_params;

}
location / {

root html;
index index.html index.htm;

}

}

Change History (4)

comment:1 follow-up: Changed 4 years ago by mdounin

  • Resolution set to invalid
  • Status changed from new to closed

The 180 seconds timeout is correct for the config provided.

comment:2 in reply to: ↑ 1 ; follow-up: Changed 4 years ago by tom8888889@…

  • Resolution invalid deleted
  • Status changed from closed to reopened

Replying to Maxim Dounin:

The 180 seconds timeout is correct for the config provided.

how to change the default 180s in nginx.conf

Last edited 4 years ago by tom8888889@… (previous) (diff)

comment:3 in reply to: ↑ 2 Changed 4 years ago by vbart

Replying to bin tom <tom8888889@gmail.com>:

how to change the default 180s in nginx.conf

It can be changed by the spdy_keepalive_timeout directive. It's currently undocumented to avoid excessive configuration, since the module has experimental status.

Please, don't reopen this ticket and use mailing lists for further questions.

comment:4 Changed 4 years ago by vbart

  • Resolution set to invalid
  • Status changed from reopened to closed
Note: See TracTickets for help on using tickets.