Help with debugging - stall on response size is a symptom but what is the cause?

Hi, I’m new to nginx and am trying to use it as a front end web server
to a java-based Play framework web app, via reverse proxy. But I’m
getting strange timeout behaviour and am not sure how to proceed with
debugging.

The full details are at
http://groups.google.com/group/play-framework/browse_thread/thread/c853a579d6015d28/e6cf2a53333aa921?lnk=gst&q=nginx#e6cf2a53333aa921

I’ve been comparing debug-mode access logs for pass and fail cases, but
cannot fathom what nginx is doing.

How could I proceed with debugging? I’m working on the assumption that
its my system configuration which is causing the problem - I haven’t
seen any other reference to this kind of problem. I’m running a box
with Ubuntu 11.10 x86_64, and nginx was installed from the Ubuntu repo.
More than happy to provide logs.

Posted at Nginx Forum:

Hello!

On Fri, Feb 10, 2012 at 10:31:33AM -0500, LetsPlay wrote:

How could I proceed with debugging? I’m working on the assumption that
its my system configuration which is causing the problem - I haven’t
seen any other reference to this kind of problem. I’m running a box
with Ubuntu 11.10 x86_64, and nginx was installed from the Ubuntu repo.
More than happy to provide logs.

Please provide debug log and nginx -V output.

Maxim D.

nginx -V
nginx: nginx version: nginx/1.0.5
nginx: TLS SNI support enabled
nginx: configure arguments: --prefix=/etc/nginx
–conf-path=/etc/nginx/nginx.conf
–error-log-path=/var/log/nginx/error.log
–http-client-body-temp-path=/var/lib/nginx/body
–http-fastcgi-temp-path=/var/lib/nginx/fastcgi
–http-log-path=/var/log/nginx/access.log
–http-proxy-temp-path=/var/lib/nginx/proxy
–http-scgi-temp-path=/var/lib/nginx/scgi
–http-uwsgi-temp-path=/var/lib/nginx/uwsgi
–lock-path=/var/lock/nginx.lock --pid-path=/var/run/nginx.pid
–with-debug --with-http_addition_module --with-http_dav_module
–with-http_geoip_module --with-http_gzip_static_module
–with-http_image_filter_module --with-http_realip_module
–with-http_stub_status_module --with-http_ssl_module
–with-http_sub_module --with-http_xslt_module --with-ipv6
–with-sha1=/usr/include/openssl --with-md5=/usr/include/openssl
–with-mail --with-mail_ssl_module
–add-module=/build/buildd/nginx-1.0.5/debian/modules/nginx-echo
–add-module=/build/buildd/nginx-1.0.5/debian/modules/nginx-upstream-fair

Logs: nginx logs for toy Play app - Pastebin.com

Here is a summary again:

Details:
System: Ubuntu 11.10, Play 1.2.4 unzipped and installed, Nginx 1.0.5
via apt-get
Network: www.myApp.com points to a static IP, which is a modem/router
with LAN address 192.168.1.1 wired to my box 192.168.1.13. The router
uses the NAT rule “forward port 80 to 192.168.1.13” (my box)
Note that local access (http://localhost:9027) works fine in all cases
Case 1: WORKS vanilla “play new myApp” works fine at
http://localhost:9027
Case 2: FAIL vanilla “play new myApp” times out at http://www.myApp.com,

nothing received by browser
Case 3: WORKS hacked index.html with short toy css, works via
www.myApp.com
Case 4: FAIL Case 3 with lengthened css, long delay via www.myApp.com,
css not used
Case 5: WORKS Case 4 but with nginx “proxy_buffering off;”, works via
www.myApp.com
Case 6: FAIL Case 5 with an extra css comment line, long delay via
www.myApp.com, css not used

Posted at Nginx Forum:

Hello!

On Sun, Feb 12, 2012 at 09:21:35PM -0500, LetsPlay wrote:

–http-scgi-temp-path=/var/lib/nginx/scgi
–add-module=/build/buildd/nginx-1.0.5/debian/modules/nginx-upstream-fair
uses the NAT rule “forward port 80 to 192.168.1.13” (my box)
Case 5: WORKS Case 4 but with nginx “proxy_buffering off;”, works via
www.myApp.com
Case 6: FAIL Case 5 with an extra css comment line, long delay via
www.myApp.com, css not used

Please try connecting nginx directly, not via NAT. There is
nothing wrong in logs as far as I see, and described
problem looks very similar to classic MTU issues. See here for
details:

Maxim D.

Maxim,

That looks like a really interesting suggestion, thank you, I would have
had no idea. When I have figured out how to do that with my setup I’ll
report back…

Posted at Nginx Forum: