keepalive_timeout timeout causes high TTFB

khav nginx-forum at
Fri Jul 24 13:40:40 UTC 2015

I am trying to further optimize SSL but if i enable keepalive_timeout i get
high TTFB as shown in the report below!/KggzF

When i disable keepalive_timeout  , TTFB is fixed but nginx recommand
keepalive_timeout :

Why does this happen ?

I welcome any other advice to further optimise SSL 


listen       443 spdy default_server reuseport;
	ssl on;
	ssl_certificate    /etc/ssl/; #(or .pem) 
    ssl_certificate_key    /etc/ssl/;
	ssl_protocols  TLSv1 TLSv1.1 TLSv1.2;
	#keepalive_timeout    70;
    ssl_prefer_server_ciphers on;
	ssl_buffer_size 8k;
    ssl_session_cache shared:SSL:20m;
	ssl_dhparam /etc/ssl/dhparam.pem;
    ssl_session_timeout 45m;
	ssl_stapling on;
    ssl_stapling_verify on;
	ssl_trusted_certificate  /etc/ssl/trustchain.crt;
	resolver valid=300s;
	resolver_timeout 5s;
	add_header Strict-Transport-Security "max-age=31536000; includeSubDomains";

Posted at Nginx Forum:,260541,260541#msg-260541

More information about the nginx mailing list