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

**URL:** <https://www.ruby-forum.com/t/help-with-debugging-stall-on-response-size-is-a-symptom-but-what-is-the-cause/216679>\
**Category:** NGINX\
**Created:** [February 10, 2012, 4:32pm UTC](https://www.ruby-forum.com/t/help-with-debugging-stall-on-response-size-is-a-symptom-but-what-is-the-cause/216679 "2012-02-10T16:32:08Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![dubstep](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/cdc98d/32.png) [@dubstep](https://www.ruby-forum.com/u/dubstep)\
**Post date:** [February 10, 2012, 4:32pm UTC](https://www.ruby-forum.com/t/help-with-debugging-stall-on-response-size-is-a-symptom-but-what-is-the-cause/216679/1 "2012-02-10T16:32:08Z")

</div>

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](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:

> **[Help with debugging - stall on response size is a symptom but what is the cause?](https://forum.nginx.org/read.php?2,222240,222240#msg-222240)**
>
> 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...

---

<div class="post-metadata">

**Author:** ![LetsPlay](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/d78d45/32.png) [@LetsPlay](https://www.ruby-forum.com/u/LetsPlay)\
**Post date:** [February 10, 2012, 4:50pm UTC](https://www.ruby-forum.com/t/help-with-debugging-stall-on-response-size-is-a-symptom-but-what-is-the-cause/216679/2 "2012-02-10T16:50:11Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![LetsPlay](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/d78d45/32.png) [@LetsPlay](https://www.ruby-forum.com/u/LetsPlay)\
**Post date:** [February 13, 2012, 3:21am UTC](https://www.ruby-forum.com/t/help-with-debugging-stall-on-response-size-is-a-symptom-but-what-is-the-cause/216679/3 "2012-02-13T03:21:52Z")

</div>

> 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](http://pastebin.com/W4Tf0vcF)

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](http://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](http://localhost:9027)) works fine in all cases  
Case 1: WORKS vanilla “play new myApp” works fine at  
[http://localhost:9027](http://localhost:9027)  
Case 2: FAIL vanilla “play new myApp” times out at [http://www.myApp.com](http://www.myApp.com),

nothing received by browser  
Case 3: WORKS hacked index.html with short toy css, works via

> **[应用宝官网-全网最新最热手机应用游戏下载](https://sj.qq.com)**
>
> 应用宝是腾讯旗下官方手机app应用商店，致力于为您提供海量、优质、安全、最新的安卓应用游戏下载！

Case 4: FAIL Case 3 with lengthened css, long delay via [www.myApp.com](http://www.myApp.com),  
css not used  
Case 5: WORKS Case 4 but with nginx “proxy\_buffering off;”, works via  
[www.myApp.com](http://www.myApp.com)  
Case 6: FAIL Case 5 with an extra css comment line, long delay via  
[www.myApp.com](http://www.myApp.com), css not used

Posted at Nginx Forum:  
[http://forum.nginx.org/read.php?2,222240,222326#msg-222326](http://forum.nginx.org/read.php?2,222240,222326#msg-222326)

---

<div class="post-metadata">

**Author:** ![LetsPlay](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/d78d45/32.png) [@LetsPlay](https://www.ruby-forum.com/u/LetsPlay)\
**Post date:** [February 13, 2012, 11:40pm UTC](https://www.ruby-forum.com/t/help-with-debugging-stall-on-response-size-is-a-symptom-but-what-is-the-cause/216679/4 "2012-02-13T23:40:10Z")

</div>

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](http://www.myApp.com)  
> Case 6: FAIL Case 5 with an extra css comment line, long delay via  
> [www.myApp.com](http://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:

[http://en.wikipedia.org/wiki/Maximum\_transmission\_unit#Path\_MTU\_Discovery](http://en.wikipedia.org/wiki/Maximum_transmission_unit#Path_MTU_Discovery)

Maxim D.

---

<div class="post-metadata">

**Author:** ![LetsPlay](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/d78d45/32.png) [@LetsPlay](https://www.ruby-forum.com/u/LetsPlay)\
**Post date:** [February 16, 2012, 6:34am UTC](https://www.ruby-forum.com/t/help-with-debugging-stall-on-response-size-is-a-symptom-but-what-is-the-cause/216679/5 "2012-02-16T06:34:33Z")

</div>

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:

> **[Re: Help with debugging - stall on response size is a symptom but what is the...](https://forum.nginx.org/read.php?2,222240,222470#msg-222470)**
>
> 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...
