0

Stalled calls

When I visit my web app's login page, I see initial calls (to load JS and image files, for example) remain in Stalled mode (represented as grey in picture above, taken from Google Chrome's network tab).

I am aware of Chrome's limitation to 6 TCP connections at a time but in this case it seems like that's not the issue as I was expecting at least 6 connections to have been created right away without getting into a stalled mode.

What can it be about? Can my nginx webserver be doing something wrong? Any idea how to debug and fix these stalled calls. I believe this can increase performance of my web application.

Better example: Better example which shows latency of 10 secs

Uthman
  • 9,251
  • 18
  • 74
  • 104
  • 1
    First of all, 170ms is *great*. Second, please post your nginx configuration on the pastebin so I will be able to tell if you have any way to improve it. – Dmitry Verhoturov May 03 '15 at 07:11
  • 1
    1. Take rid of unix sockets, it's preferable to use TCP, otherwise you might find problems under high load (that's why [my answer](http://stackoverflow.com/questions/10470109/error-502-in-nginx-php5-fpm/10470827#10470827) is so popular); 2. nginx [listen](http://nginx.org/en/docs/http/ngx_http_core_module.html#listen): change `listen 10.10.228.42:443 ssl;` to `listen 10.10.228.42:443 ssl spdy deferred;` to enjoy SPDY protocol features where browser support it (Chrome is); 3. consider reworking security part, here is [good example](https://gist.github.com/paskal/628882bee1948ef126dd) to follow. – Dmitry Verhoturov May 03 '15 at 08:23
  • Ah! seems like my nginx wasn't compiled with spdy module. Is there a way to insert the module while nginx is running? I think my initial connections are going in stall mode because nginx might have a limit on concurrent number of connections which is possibly less in my case. And those calls go in stall mode as concurrent connection quota is used up! – Uthman May 03 '15 at 09:00
  • 1
    [Here is](http://nginx.org/en/docs/http/ngx_http_limit_conn_module.html) the module which limits connections per ip and it's not enabled by default. There is no way to insert module in working copy of nginx, just upgrade the package and restart nginx — it will replace workers and nginx executable itself so you won't miss any requests (if your configuration is correct, of course). – Dmitry Verhoturov May 03 '15 at 10:03

0 Answers0