Opened 10 years ago

Closed 10 years ago

#652 closed task (invalid)

after use spdy keepalive_timeout always 180000

Reported by: bin tom 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 by Maxim Dounin, 10 years ago

Resolution: invalid
Status: newclosed

The 180 seconds timeout is correct for the config provided.

in reply to:  1 ; comment:2 by bin tom, 10 years ago

Resolution: invalid
Status: closedreopened

Replying to Maxim Dounin:

The 180 seconds timeout is correct for the config provided.

how to change the default 180s

Version 0, edited 10 years ago by bin tom (next)

in reply to:  2 comment:3 by Valentin V. Bartenev, 10 years ago

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 by Valentin V. Bartenev, 10 years ago

Resolution: invalid
Status: reopenedclosed
Note: See TracTickets for help on using tickets.