Forum: NGINX aio breaks spdy

Ebfa54c92a50798dfdbbdb4e28ed1f29?d=identicon&s=25 Richard Kearsley (Guest)
on 2014-08-16 00:37
(Received via mailing list)
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;
         }
     }
}
40b4c848b8fcd63b0cb60b9d170c3a77?d=identicon&s=25 Valentin V. Bartenev (Guest)
on 2014-08-16 01:01
(Received via mailing list)
On Saturday 16 August 2014 00:37:15 Richard Kearsley 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
Ebfa54c92a50798dfdbbdb4e28ed1f29?d=identicon&s=25 Richard Kearsley (Guest)
on 2014-08-16 01:30
(Received via mailing list)
Attachment: debug-spdy-aio-2014-08-15-1.log (300 KB)
attached
40b4c848b8fcd63b0cb60b9d170c3a77?d=identicon&s=25 Valentin V. Bartenev (Guest)
on 2014-08-16 23:19
(Received via mailing list)
On Saturday 16 August 2014 01:27:19 Richard Kearsley 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);
         }
Ebfa54c92a50798dfdbbdb4e28ed1f29?d=identicon&s=25 Richard Kearsley (Guest)
on 2014-08-17 00:04
(Received via mailing list)
Hi

Tested 1.6.1 and 1.7.4
Speed is back to normal

Many thanks!
Richard
40b4c848b8fcd63b0cb60b9d170c3a77?d=identicon&s=25 Valentin V. Bartenev (Guest)
on 2014-08-27 19:24
(Received via mailing list)
On Sunday 17 August 2014 00:04:14 Richard Kearsley 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
Please log in before posting. Registration is free and takes only a minute.
Existing account

NEW: Do you have a Google/GoogleMail, Yahoo or Facebook account? No registration required!
Log in with Google account | Log in with Yahoo account | Log in with Facebook account
No account? Register here.