Aio breaks spdy

Hi
I have been tracing an issue for the past couple of days and have
narrowed down the case to when spdy is being used with aio
Testing using a 1GB file download in chrome and firefox, http and https
download as normal
using spdy, only the first ~250k is downloaded and then a wait of
exactly 60 seconds between subsequent bursts of ~250k
turning ‘aio off;’ fixes the problem and spdy can download at the normal
speed

I hope someone can investigate this further
Configuration details are below, if any more information is needed
please let me know

Many thanks
Richard

FreeBSD 9.2

OpenSSL 1.0.1i 6 Aug 2014

nginx version: nginx/1.7.4 built by gcc 4.2.1 20070831 patched [FreeBSD]
TLS SNI support enabled configure arguments: --with-debug
–with-http_ssl_module --with-http_spdy_module --with-file-aio
also tried nginx/1.6.0

nginx.conf:

worker_processes 1;

events {
worker_connections 1024;
}

http {
include mime.types;

 aio on;

 ssl_certificate     default.cer;
 ssl_certificate_key default.key;

 server {
     listen       80;
     listen 443 ssl spdy;

     location / {
         root   /data;
         index  index.html index.htm;
     }
 }

}

On Saturday 16 August 2014 00:37:15 Richard K. wrote:

I hope someone can investigate this further
Configuration details are below, if any more information is needed
please let me know

Could you provide a debug log?
http://nginx.org/en/docs/debugging_log.html

wbr, Valentin V. Bartenev

attached

Hi

Tested 1.6.1 and 1.7.4
Speed is back to normal

Many thanks!
Richard

On Saturday 16 August 2014 01:27:19 Richard K. wrote:

attached

Thank you for the report.
Please, try the following patch:

diff -r f1e05e533c8b src/http/ngx_http_request.c
— a/src/http/ngx_http_request.c Thu Jul 31 13:59:37 2014 +0400
+++ b/src/http/ngx_http_request.c Sun Aug 17 01:16:50 2014 +0400
@@ -2656,6 +2656,12 @@ ngx_http_writer(ngx_http_request_t *r)

 if (r->buffered || r->postponed || (r == r->main && c->buffered)) {

+#if (NGX_HTTP_SPDY)

  •    if (r->spdy_stream) {
    
  •        return;
    
  •    }
    

+#endif
+
if (!wev->delayed) {
ngx_add_timer(wev, clcf->send_timeout);
}

On Sunday 17 August 2014 00:04:14 Richard K. wrote:

Hi

Tested 1.6.1 and 1.7.4
Speed is back to normal

Thank you for testing.

The fix was committed: http://hg.nginx.org/nginx/rev/11790b461a6f
and likely will be released with 1.7.5.

wbr, Valentin V. Bartenev