unicorn Ruby/Rack server user+dev discussion/patches/pulls/bugs/help
 help / color / mirror / code / Atom feed
* Issue with Unicorn: Big latency when getting a request
@ 2014-11-12 19:46 Roberto Cordoba del Moral
  2014-11-13  7:12 ` Roberto Cordoba del Moral
  0 siblings, 1 reply; 17+ messages in thread
From: Roberto Cordoba del Moral @ 2014-11-12 19:46 UTC (permalink / raw)
  To: unicorn-public@bogomips.org

[-- Attachment #1: Type: text/plain, Size: 442 bytes --]

Hi,
   I´m getting crazy with an big latency of 12 seconds I get first time I send a request to Unicorn (after that, everything is fine).
Please, see the problem detailed in this post in stackoverflow http://stackoverflow.com/questions/26894622/big-delay-while-processing-http-request-from-nginx-to-unicorn-angularjs-to-rail
I really hope you can help me, because I don´t know what else can I check.
Thank you so much,Roberto. 		 	   		  

[-- Attachment #2: Type: text/html, Size: 960 bytes --]

^ permalink raw reply	[flat|nested] 17+ messages in thread

* RE: Issue with Unicorn: Big latency when getting a request
  2014-11-12 19:46 Issue with Unicorn: Big latency when getting a request Roberto Cordoba del Moral
@ 2014-11-13  7:12 ` Roberto Cordoba del Moral
  2014-11-13 21:03   ` Eric Wong
  0 siblings, 1 reply; 17+ messages in thread
From: Roberto Cordoba del Moral @ 2014-11-13  7:12 UTC (permalink / raw)
  To: unicorn-public@bogomips.org

[-- Attachment #1: Type: text/plain, Size: 987 bytes --]

Hi guys,
  please see my updates in the post. Now, I´m pretty sure the problem is Unicorn (when I shutdown Unicorn and test with webRick the problem doesn´t happen anymore), but I don´t know why.
http://stackoverflow.com/questions/26894622/big-delay-while-processing-http-request-from-nginx-to-unicorn-angularjs-to-rail
Thanks in advance.Roberto.

From: roberto.chingon@hotmail.com
To: unicorn-public@bogomips.org
Subject: Issue with Unicorn: Big latency when getting a request
Date: Wed, 12 Nov 2014 20:46:13 +0100




Hi,
   I´m getting crazy with an big latency of 12 seconds I get first time I send a request to Unicorn (after that, everything is fine).
Please, see the problem detailed in this post in stackoverflow http://stackoverflow.com/questions/26894622/big-delay-while-processing-http-request-from-nginx-to-unicorn-angularjs-to-rail
I really hope you can help me, because I don´t know what else can I check.
Thank you so much,Roberto. 		 	   		   		 	   		  

[-- Attachment #2: Type: text/html, Size: 1971 bytes --]

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Issue with Unicorn: Big latency when getting a request
  2014-11-13  7:12 ` Roberto Cordoba del Moral
@ 2014-11-13 21:03   ` Eric Wong
  2014-11-14  6:46     ` Roberto Cordoba del Moral
  0 siblings, 1 reply; 17+ messages in thread
From: Eric Wong @ 2014-11-13 21:03 UTC (permalink / raw)
  To: Roberto Cordoba del Moral; +Cc: unicorn-public@bogomips.org

Please don't send HTML portions in email, it will be flagged as spam
and not checked frequently as it wastes my bandwidth and storage.

Can you post your nginx error log and see if there's anything there?
What happens if you point your browser directly at unicorn to hit
the getTranslationLanguages endpoint directly?

Thanks.


(Also, don't expect me to post on any websites regarding unicorn;
 I work on web servers because I can't stand web browsers :P)

^ permalink raw reply	[flat|nested] 17+ messages in thread

* RE: Issue with Unicorn: Big latency when getting a request
  2014-11-13 21:03   ` Eric Wong
@ 2014-11-14  6:46     ` Roberto Cordoba del Moral
  2014-11-14  7:19       ` Eric Wong
  0 siblings, 1 reply; 17+ messages in thread
From: Roberto Cordoba del Moral @ 2014-11-14  6:46 UTC (permalink / raw)
  To: Eric Wong; +Cc: unicorn-public@bogomips.org

Hi Eric,
  nothing in my Nginx error.log.
If I point my browser directly to my endpoint by localhost:8080/getTranslationLanguages I get the results in json format in my browser inmediately (with no latencies). This is working fine.
Thanks for your support.Roberto.

> Date: Thu, 13 Nov 2014 21:03:32 +0000
> From: e@80x24.org
> To: roberto.chingon@hotmail.com
> CC: unicorn-public@bogomips.org
> Subject: Re: Issue with Unicorn: Big latency when getting a request
> 
> Please don't send HTML portions in email, it will be flagged as spam
> and not checked frequently as it wastes my bandwidth and storage.
> 
> Can you post your nginx error log and see if there's anything there?
> What happens if you point your browser directly at unicorn to hit
> the getTranslationLanguages endpoint directly?
> 
> Thanks.
> 
> 
> (Also, don't expect me to post on any websites regarding unicorn;
>  I work on web servers because I can't stand web browsers :P)
 		 	   		  

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Issue with Unicorn: Big latency when getting a request
  2014-11-14  6:46     ` Roberto Cordoba del Moral
@ 2014-11-14  7:19       ` Eric Wong
  2014-11-14  9:09         ` Roberto Cordoba del Moral
  0 siblings, 1 reply; 17+ messages in thread
From: Eric Wong @ 2014-11-14  7:19 UTC (permalink / raw)
  To: Roberto Cordoba del Moral; +Cc: unicorn-public

Roberto Cordoba del Moral <roberto.chingon@hotmail.com> wrote:
> Hi Eric,
>   nothing in my Nginx error.log.
> If I point my browser directly to my endpoint by localhost:8080/getTranslationLanguages I get the results in json format in my browser inmediately (with no latencies). This is working fine.
> Thanks for your support.Roberto.

So the issue is with nginx communicating with unicorn, and not unicorn
itself.  Can you crank up the verbosity of nginx logging and/or strace
an nginx worker to see what's going on?

(only configure nginx to use one worker to guarantee you're stracing
right one).


Again, please do not send HTML or top-post.  We adhere to old-fashioned
mailing list posting conventions here.  Thanks.

^ permalink raw reply	[flat|nested] 17+ messages in thread

* RE: Issue with Unicorn: Big latency when getting a request
  2014-11-14  7:19       ` Eric Wong
@ 2014-11-14  9:09         ` Roberto Cordoba del Moral
  2014-11-14  9:32           ` Roberto Cordoba del Moral
  0 siblings, 1 reply; 17+ messages in thread
From: Roberto Cordoba del Moral @ 2014-11-14  9:09 UTC (permalink / raw)
  To: Eric Wong; +Cc: unicorn-public@bogomips.org

Hi Eric,
   I´m not pretty sure how to crank up the verbosity of nginx although I think I got it, because when I restart Nginx I get next logs:
2014/11/14 10:00:10 [notice] 39156#0: using the "kqueue" event method2014/11/14 10:00:10 [warn] 39156#0: 1024 worker_connections exceed open file resource limit: 2562014/11/14 10:00:10 [notice] 39156#0: nginx/1.6.02014/11/14 10:00:10 [notice] 39156#0: built by clang 5.1 (clang-503.0.40) (based on LLVM 3.4svn)2014/11/14 10:00:10 [notice] 39156#0: OS: Darwin 13.4.02014/11/14 10:00:10 [notice] 39156#0: hw.ncpu: 42014/11/14 10:00:10 [notice] 39156#0: net.inet.tcp.sendspace: 1310722014/11/14 10:00:10 [notice] 39156#0: kern.ipc.somaxconn: 1282014/11/14 10:00:10 [notice] 39156#0: getrlimit(RLIMIT_NOFILE): 256:92233720368547758072014/11/14 10:00:10 [notice] 39157#0: start worker processes2014/11/14 10:00:10 [notice] 39157#0: start worker process 39158
Besides that, I got nothing else in this log when I load my website.
I think I have just one worker. Please find my nginx.conf file:

#user  nobody;worker_processes  1;
#error_log  logs/error.log;#error_log  logs/error.log  notice;#error_log  logs/error.log  info;error_log   logs/error.log debug;
#pid        logs/nginx.pid;

events {    worker_connections  1024;





















}
http {    include       mime.types;    default_type  application/octet-stream;
    #log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '    #                  '$status $body_bytes_sent "$http_referer" '    #                  '"$http_user_agent" "$http_x_forwarded_for"';
   # access_log  logs/access.log  main;
    sendfile        on;    #tcp_nopush     on;
    #keepalive_timeout  0;    keepalive_timeout  65;
    #gzip  on;
    server {        listen       80;        server_name  localhost;
        #charset koi8-r;        access_log  logs/host.access.log;        rewrite_log on;        location / {            root   /Users/Rober/Projects/yanpy/dev/yanpy/app;            index  index.html index.htm;        }
        #error_page  404              /404.html;
        # redirect server error pages to the static page /50x.html        #        error_page   500 502 503 504  /50x.html;










































        location = /50x.html {            root   html;        }
    }




















}
Regarding your comment: Again, please do not send HTML or top-post. We adhere to old-fashioned mailing list posting conventions here.
I don´t know what you mean. I´m answering you from my outlook web mail account.
Thanks, Roberto.


> Date: Fri, 14 Nov 2014 07:19:22 +0000
> From: e@80x24.org
> To: roberto.chingon@hotmail.com
> CC: unicorn-public@bogomips.org
> Subject: Re: Issue with Unicorn: Big latency when getting a request
> 
> Roberto Cordoba del Moral <roberto.chingon@hotmail.com> wrote:
> > Hi Eric,
> >   nothing in my Nginx error.log.
> > If I point my browser directly to my endpoint by localhost:8080/getTranslationLanguages I get the results in json format in my browser inmediately (with no latencies). This is working fine.
> > Thanks for your support.Roberto.
> 
> So the issue is with nginx communicating with unicorn, and not unicorn
> itself.  Can you crank up the verbosity of nginx logging and/or strace
> an nginx worker to see what's going on?
> 
> (only configure nginx to use one worker to guarantee you're stracing
> right one).
> 
> 
> Again, please do not send HTML or top-post.  We adhere to old-fashioned
> mailing list posting conventions here.  Thanks.
 		 	   		  

^ permalink raw reply	[flat|nested] 17+ messages in thread

* RE: Issue with Unicorn: Big latency when getting a request
  2014-11-14  9:09         ` Roberto Cordoba del Moral
@ 2014-11-14  9:32           ` Roberto Cordoba del Moral
  2014-11-14 10:02             ` Eric Wong
  0 siblings, 1 reply; 17+ messages in thread
From: Roberto Cordoba del Moral @ 2014-11-14  9:32 UTC (permalink / raw)
  To: Eric Wong; +Cc: unicorn-public@bogomips.org

Hi Eric,
 as you don´t like web. I don´t know if you read my latest updates. Please, find them attached. I don´t know if they could be helpful tracks.
UPDATE: I don´t know why it seems to be related to cache or cookies. When I delete browsing history with cache and cookies in my browser and I load the site the issue doesn´t happen anymore. After that, if I just refresh the page, the issue happens.
Thanks,Roberto.

From: roberto.chingon@hotmail.com
To: e@80x24.org
CC: unicorn-public@bogomips.org
Subject: RE: Issue with Unicorn: Big latency when getting a request
Date: Fri, 14 Nov 2014 10:09:13 +0100




Hi Eric,
   I´m not pretty sure how to crank up the verbosity of nginx although I think I got it, because when I restart Nginx I get next logs:
2014/11/14 10:00:10 [notice] 39156#0: using the "kqueue" event method2014/11/14 10:00:10 [warn] 39156#0: 1024 worker_connections exceed open file resource limit: 2562014/11/14 10:00:10 [notice] 39156#0: nginx/1.6.02014/11/14 10:00:10 [notice] 39156#0: built by clang 5.1 (clang-503.0.40) (based on LLVM 3.4svn)2014/11/14 10:00:10 [notice] 39156#0: OS: Darwin 13.4.02014/11/14 10:00:10 [notice] 39156#0: hw.ncpu: 42014/11/14 10:00:10 [notice] 39156#0: net.inet.tcp.sendspace: 1310722014/11/14 10:00:10 [notice] 39156#0: kern.ipc.somaxconn: 1282014/11/14 10:00:10 [notice] 39156#0: getrlimit(RLIMIT_NOFILE): 256:92233720368547758072014/11/14 10:00:10 [notice] 39157#0: start worker processes2014/11/14 10:00:10 [notice] 39157#0: start worker process 39158
Besides that, I got nothing else in this log when I load my website.
I think I have just one worker. Please find my nginx.conf file:

#user  nobody;worker_processes  1;
#error_log  logs/error.log;#error_log  logs/error.log  notice;#error_log  logs/error.log  info;error_log   logs/error.log debug;
#pid        logs/nginx.pid;

events {    worker_connections  1024;





















}
http {    include       mime.types;    default_type  application/octet-stream;
    #log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '    #                  '$status $body_bytes_sent "$http_referer" '    #                  '"$http_user_agent" "$http_x_forwarded_for"';
   # access_log  logs/access.log  main;
    sendfile        on;    #tcp_nopush     on;
    #keepalive_timeout  0;    keepalive_timeout  65;
    #gzip  on;
    server {        listen       80;        server_name  localhost;
        #charset koi8-r;        access_log  logs/host.access.log;        rewrite_log on;        location / {            root   /Users/Rober/Projects/yanpy/dev/yanpy/app;            index  index.html index.htm;        }
        #error_page  404              /404.html;
        # redirect server error pages to the static page /50x.html        #        error_page   500 502 503 504  /50x.html;










































        location = /50x.html {            root   html;        }
    }




















}
Regarding your comment: Again, please do not send HTML or top-post. We adhere to old-fashioned mailing list posting conventions here.
I don´t know what you mean. I´m answering you from my outlook web mail account.
Thanks, Roberto.


> Date: Fri, 14 Nov 2014 07:19:22 +0000
> From: e@80x24.org
> To: roberto.chingon@hotmail.com
> CC: unicorn-public@bogomips.org
> Subject: Re: Issue with Unicorn: Big latency when getting a request
> 
> Roberto Cordoba del Moral <roberto.chingon@hotmail.com> wrote:
> > Hi Eric,
> >   nothing in my Nginx error.log.
> > If I point my browser directly to my endpoint by localhost:8080/getTranslationLanguages I get the results in json format in my browser inmediately (with no latencies). This is working fine.
> > Thanks for your support.Roberto.
> 
> So the issue is with nginx communicating with unicorn, and not unicorn
> itself.  Can you crank up the verbosity of nginx logging and/or strace
> an nginx worker to see what's going on?
> 
> (only configure nginx to use one worker to guarantee you're stracing
> right one).
> 
> 
> Again, please do not send HTML or top-post.  We adhere to old-fashioned
> mailing list posting conventions here.  Thanks.
 		 	   		   		 	   		  

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Issue with Unicorn: Big latency when getting a request
  2014-11-14  9:32           ` Roberto Cordoba del Moral
@ 2014-11-14 10:02             ` Eric Wong
  2014-11-14 10:12               ` Roberto Cordoba del Moral
  0 siblings, 1 reply; 17+ messages in thread
From: Eric Wong @ 2014-11-14 10:02 UTC (permalink / raw)
  To: Roberto Cordoba del Moral; +Cc: unicorn-public

Roberto Cordoba del Moral <roberto.chingon@hotmail.com> wrote:
> Hi Eric,
>
>  as you don´t like web. I don´t know if you read my latest updates.
>  Please, find them attached. I don´t know if they could be helpful
>  tracks.  UPDATE: I don´t know why it seems to be related to cache or
>  cookies. When I delete browsing history with cache and cookies in my
>  browser and I load the site the issue doesn´t happen anymore. After
>  that, if I just refresh the page, the issue happens.  Thanks,Roberto.

It's probably something related to your frontend/Angular setup (which I
know nothing about).  Try disabling cookies + cache in your browser
completely...  Some browsers have extensions/plugins which can trace
HTTP requests, too.

>    I´m not pretty sure how to crank up the verbosity of nginx although
>    I think I got it, because when I restart Nginx I get next logs:

Server debugging:

Uncomment one of your "error_log" lines in your nginx conf:

	error_log logs/error.log debug;

	(you can change the path, of course)

I suggest using your Ubuntu (or any GNU/Linux) test environment which
has strace.  I cannot support any software on Darwin.

You may also use tcpdump/strace on your browser, too, but I suspect for
your case it'll be easier to use whatever debugging tools +
plugins/extensions your browser supports.

This really doesn't seem to be a unicorn or nginx bug, though...

^ permalink raw reply	[flat|nested] 17+ messages in thread

* RE: Issue with Unicorn: Big latency when getting a request
  2014-11-14 10:02             ` Eric Wong
@ 2014-11-14 10:12               ` Roberto Cordoba del Moral
  2014-11-14 10:15                 ` Roberto Cordoba del Moral
  0 siblings, 1 reply; 17+ messages in thread
From: Roberto Cordoba del Moral @ 2014-11-14 10:12 UTC (permalink / raw)
  To: Eric Wong; +Cc: unicorn-public@bogomips.org

I have no idea about what can it be. I don´t see any blog, issue or post on internet related to this. It´s strange this is only happening to me.
Anyway, remember the issue is not happening when I replace Unicorn with webRick.

> Date: Fri, 14 Nov 2014 10:02:08 +0000
> From: e@80x24.org
> To: roberto.chingon@hotmail.com
> CC: unicorn-public@bogomips.org
> Subject: Re: Issue with Unicorn: Big latency when getting a request
> 
> Roberto Cordoba del Moral <roberto.chingon@hotmail.com> wrote:
> > Hi Eric,
> >
> >  as you don´t like web. I don´t know if you read my latest updates.
> >  Please, find them attached. I don´t know if they could be helpful
> >  tracks.  UPDATE: I don´t know why it seems to be related to cache or
> >  cookies. When I delete browsing history with cache and cookies in my
> >  browser and I load the site the issue doesn´t happen anymore. After
> >  that, if I just refresh the page, the issue happens.  Thanks,Roberto.
> 
> It's probably something related to your frontend/Angular setup (which I
> know nothing about).  Try disabling cookies + cache in your browser
> completely...  Some browsers have extensions/plugins which can trace
> HTTP requests, too.
> 
> >    I´m not pretty sure how to crank up the verbosity of nginx although
> >    I think I got it, because when I restart Nginx I get next logs:
> 
> Server debugging:
> 
> Uncomment one of your "error_log" lines in your nginx conf:
> 
> 	error_log logs/error.log debug;
> 
> 	(you can change the path, of course)
> 
> I suggest using your Ubuntu (or any GNU/Linux) test environment which
> has strace.  I cannot support any software on Darwin.
> 
> You may also use tcpdump/strace on your browser, too, but I suspect for
> your case it'll be easier to use whatever debugging tools +
> plugins/extensions your browser supports.
> 
> This really doesn't seem to be a unicorn or nginx bug, though...
 		 	   		  

^ permalink raw reply	[flat|nested] 17+ messages in thread

* RE: Issue with Unicorn: Big latency when getting a request
  2014-11-14 10:12               ` Roberto Cordoba del Moral
@ 2014-11-14 10:15                 ` Roberto Cordoba del Moral
  2014-11-14 10:28                   ` Eric Wong
  0 siblings, 1 reply; 17+ messages in thread
From: Roberto Cordoba del Moral @ 2014-11-14 10:15 UTC (permalink / raw)
  To: Eric Wong; +Cc: unicorn-public@bogomips.org

[-- Attachment #1: Type: text/plain, Size: 2392 bytes --]

I´m using the Google Chrome debugging tools. There you can see the getTranslationLanguages request which is WAITING for 12 seconds. But, anyway, I don´t know the reason why.
Please let my attach the screenshot.









From: roberto.chingon@hotmail.com
To: e@80x24.org
CC: unicorn-public@bogomips.org
Subject: RE: Issue with Unicorn: Big latency when getting a request
Date: Fri, 14 Nov 2014 11:12:16 +0100




I have no idea about what can it be. I don´t see any blog, issue or post on internet related to this. It´s strange this is only happening to me.
Anyway, remember the issue is not happening when I replace Unicorn with webRick.

> Date: Fri, 14 Nov 2014 10:02:08 +0000
> From: e@80x24.org
> To: roberto.chingon@hotmail.com
> CC: unicorn-public@bogomips.org
> Subject: Re: Issue with Unicorn: Big latency when getting a request
> 
> Roberto Cordoba del Moral <roberto.chingon@hotmail.com> wrote:
> > Hi Eric,
> >
> >  as you don´t like web. I don´t know if you read my latest updates.
> >  Please, find them attached. I don´t know if they could be helpful
> >  tracks.  UPDATE: I don´t know why it seems to be related to cache or
> >  cookies. When I delete browsing history with cache and cookies in my
> >  browser and I load the site the issue doesn´t happen anymore. After
> >  that, if I just refresh the page, the issue happens.  Thanks,Roberto.
> 
> It's probably something related to your frontend/Angular setup (which I
> know nothing about).  Try disabling cookies + cache in your browser
> completely...  Some browsers have extensions/plugins which can trace
> HTTP requests, too.
> 
> >    I´m not pretty sure how to crank up the verbosity of nginx although
> >    I think I got it, because when I restart Nginx I get next logs:
> 
> Server debugging:
> 
> Uncomment one of your "error_log" lines in your nginx conf:
> 
> 	error_log logs/error.log debug;
> 
> 	(you can change the path, of course)
> 
> I suggest using your Ubuntu (or any GNU/Linux) test environment which
> has strace.  I cannot support any software on Darwin.
> 
> You may also use tcpdump/strace on your browser, too, but I suspect for
> your case it'll be easier to use whatever debugging tools +
> plugins/extensions your browser supports.
> 
> This really doesn't seem to be a unicorn or nginx bug, though...
 		 	   		   		 	   		  

[-- Attachment #2: Type: text/plain, Size: 2507 bytes --]

   I'm using the Google Chrome debugging tools. There you can see the
   getTranslationLanguages request which is WAITING for 12 seconds. But,
   anyway, I don't know the reason why.
   Please let my attach the screenshot.
     __________________________________________________________________

   From: roberto.chingon@hotmail.com
   To: e@80x24.org
   CC: unicorn-public@bogomips.org
   Subject: RE: Issue with Unicorn: Big latency when getting a request
   Date: Fri, 14 Nov 2014 11:12:16 +0100
   I have no idea about what can it be. I don't see any blog, issue or
   post on internet related to this. It's strange this is only happening
   to me.
   Anyway, remember the issue is not happening when I replace Unicorn with
   webRick.
   > Date: Fri, 14 Nov 2014 10:02:08 +0000
   > From: e@80x24.org
   > To: roberto.chingon@hotmail.com
   > CC: unicorn-public@bogomips.org
   > Subject: Re: Issue with Unicorn: Big latency when getting a request
   >
   > Roberto Cordoba del Moral <roberto.chingon@hotmail.com> wrote:
   > > Hi Eric,
   > >
   > > as you don't like web. I don't know if you read my latest updates.
   > > Please, find them attached. I don't know if they could be helpful
   > > tracks. UPDATE: I don't know why it seems to be related to cache or
   > > cookies. When I delete browsing history with cache and cookies in
   my
   > > browser and I load the site the issue doesn't happen anymore. After
   > > that, if I just refresh the page, the issue happens.
   Thanks,Roberto.
   >
   > It's probably something related to your frontend/Angular setup (which
   I
   > know nothing about). Try disabling cookies + cache in your browser
   > completely... Some browsers have extensions/plugins which can trace
   > HTTP requests, too.
   >
   > > I'm not pretty sure how to crank up the verbosity of nginx although
   > > I think I got it, because when I restart Nginx I get next logs:
   >
   > Server debugging:
   >
   > Uncomment one of your "error_log" lines in your nginx conf:
   >
   > error_log logs/error.log debug;
   >
   > (you can change the path, of course)
   >
   > I suggest using your Ubuntu (or any GNU/Linux) test environment which
   > has strace. I cannot support any software on Darwin.
   >
   > You may also use tcpdump/strace on your browser, too, but I suspect
   for
   > your case it'll be easier to use whatever debugging tools +
   > plugins/extensions your browser supports.
   >
   > This really doesn't seem to be a unicorn or nginx bug, though...

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Issue with Unicorn: Big latency when getting a request
  2014-11-14 10:15                 ` Roberto Cordoba del Moral
@ 2014-11-14 10:28                   ` Eric Wong
  2014-11-14 10:51                     ` Roberto Cordoba del Moral
  0 siblings, 1 reply; 17+ messages in thread
From: Eric Wong @ 2014-11-14 10:28 UTC (permalink / raw)
  To: Roberto Cordoba del Moral; +Cc: unicorn-public

Can you try Thin, Puma or another server?

Maybe configuring more unicorn worker_processes can help if your JS
needs multiple connections to function for some reason.
unicorn cannot do concurrency without multiple worker_processes.

I cannot view screenshots (or any images/video).

^ permalink raw reply	[flat|nested] 17+ messages in thread

* RE: Issue with Unicorn: Big latency when getting a request
  2014-11-14 10:28                   ` Eric Wong
@ 2014-11-14 10:51                     ` Roberto Cordoba del Moral
  2014-11-14 11:03                       ` Eric Wong
  0 siblings, 1 reply; 17+ messages in thread
From: Roberto Cordoba del Moral @ 2014-11-14 10:51 UTC (permalink / raw)
  To: Eric Wong; +Cc: unicorn-public@bogomips.org

I´m getting this warn message when starting NGINX








nginx: [warn] 1024 worker_connections exceed open file resource limit: 256
Could it be related to this?
> Date: Fri, 14 Nov 2014 10:28:57 +0000
> From: e@80x24.org
> To: roberto.chingon@hotmail.com
> CC: unicorn-public@bogomips.org
> Subject: Re: Issue with Unicorn: Big latency when getting a request
> 
> Can you try Thin, Puma or another server?
> 
> Maybe configuring more unicorn worker_processes can help if your JS
> needs multiple connections to function for some reason.
> unicorn cannot do concurrency without multiple worker_processes.
> 
> I cannot view screenshots (or any images/video).
 		 	   		  

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Issue with Unicorn: Big latency when getting a request
  2014-11-14 10:51                     ` Roberto Cordoba del Moral
@ 2014-11-14 11:03                       ` Eric Wong
  2014-11-14 11:15                         ` Roberto Cordoba del Moral
  2014-11-14 15:01                         ` Roberto Cordoba del Moral
  0 siblings, 2 replies; 17+ messages in thread
From: Eric Wong @ 2014-11-14 11:03 UTC (permalink / raw)
  To: Roberto Cordoba del Moral; +Cc: unicorn-public

Roberto Cordoba del Moral <roberto.chingon@hotmail.com> wrote:
> I´m getting this warn message when starting NGINX
> 
> nginx: [warn] 1024 worker_connections exceed open file resource limit: 256
> Could it be related to this?

Probably not.  You could try "ulimit -n 1024" before starting nginx
(assuming you have proper permissions).

You'd have to really do something strange in your client scripts to have
a browser open more than 256 connections to a single page load.  I seem
to remember browsers (by default) will only open 4-8 connections to a
single host at once.

Try increasing worker_processes in unicorn (not nginx).
Or try Thin/Puma, since WEBrick works.

unicorn is _not_ a good choice if you're doing any long-lived
HTTP connections or any slow request processing.

^ permalink raw reply	[flat|nested] 17+ messages in thread

* RE: Issue with Unicorn: Big latency when getting a request
  2014-11-14 11:03                       ` Eric Wong
@ 2014-11-14 11:15                         ` Roberto Cordoba del Moral
  2014-11-14 15:01                         ` Roberto Cordoba del Moral
  1 sibling, 0 replies; 17+ messages in thread
From: Roberto Cordoba del Moral @ 2014-11-14 11:15 UTC (permalink / raw)
  To: Eric Wong; +Cc: unicorn-public@bogomips.org

Hi Eric,
   the research has given an unexpected turn.
I have confirmed the issue is only happening with Google Chrome. With Safari never happens.
It has to be something related to cookies or cache with Chrome.

> Date: Fri, 14 Nov 2014 11:03:06 +0000
> From: e@80x24.org
> To: roberto.chingon@hotmail.com
> CC: unicorn-public@bogomips.org
> Subject: Re: Issue with Unicorn: Big latency when getting a request
> 
> Roberto Cordoba del Moral <roberto.chingon@hotmail.com> wrote:
> > I´m getting this warn message when starting NGINX
> > 
> > nginx: [warn] 1024 worker_connections exceed open file resource limit: 256
> > Could it be related to this?
> 
> Probably not.  You could try "ulimit -n 1024" before starting nginx
> (assuming you have proper permissions).
> 
> You'd have to really do something strange in your client scripts to have
> a browser open more than 256 connections to a single page load.  I seem
> to remember browsers (by default) will only open 4-8 connections to a
> single host at once.
> 
> Try increasing worker_processes in unicorn (not nginx).
> Or try Thin/Puma, since WEBrick works.
> 
> unicorn is _not_ a good choice if you're doing any long-lived
> HTTP connections or any slow request processing.
 		 	   		  

^ permalink raw reply	[flat|nested] 17+ messages in thread

* RE: Issue with Unicorn: Big latency when getting a request
  2014-11-14 11:03                       ` Eric Wong
  2014-11-14 11:15                         ` Roberto Cordoba del Moral
@ 2014-11-14 15:01                         ` Roberto Cordoba del Moral
  2014-11-14 18:34                           ` Eric Wong
  1 sibling, 1 reply; 17+ messages in thread
From: Roberto Cordoba del Moral @ 2014-11-14 15:01 UTC (permalink / raw)
  To: Eric Wong; +Cc: unicorn-public@bogomips.org

I have installed Puma and it´s working.
It´s the combination of Unicorn and Chrome which is not working. I don´t know why.

> Date: Fri, 14 Nov 2014 11:03:06 +0000
> From: e@80x24.org
> To: roberto.chingon@hotmail.com
> CC: unicorn-public@bogomips.org
> Subject: Re: Issue with Unicorn: Big latency when getting a request
> 
> Roberto Cordoba del Moral <roberto.chingon@hotmail.com> wrote:
> > I´m getting this warn message when starting NGINX
> > 
> > nginx: [warn] 1024 worker_connections exceed open file resource limit: 256
> > Could it be related to this?
> 
> Probably not.  You could try "ulimit -n 1024" before starting nginx
> (assuming you have proper permissions).
> 
> You'd have to really do something strange in your client scripts to have
> a browser open more than 256 connections to a single page load.  I seem
> to remember browsers (by default) will only open 4-8 connections to a
> single host at once.
> 
> Try increasing worker_processes in unicorn (not nginx).
> Or try Thin/Puma, since WEBrick works.
> 
> unicorn is _not_ a good choice if you're doing any long-lived
> HTTP connections or any slow request processing.
 		 	   		  

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Issue with Unicorn: Big latency when getting a request
  2014-11-14 15:01                         ` Roberto Cordoba del Moral
@ 2014-11-14 18:34                           ` Eric Wong
  2014-11-14 22:36                             ` Roberto Cordoba del Moral
  0 siblings, 1 reply; 17+ messages in thread
From: Eric Wong @ 2014-11-14 18:34 UTC (permalink / raw)
  To: Roberto Cordoba del Moral; +Cc: unicorn-public

Roberto Cordoba del Moral <roberto.chingon@hotmail.com> wrote:
> I have installed Puma and it´s working.
> It´s the combination of Unicorn and Chrome which is not working. I
> don´t know why.

Just curious, can you try configuring "worker_processes 4" in unicorn
(or maybe increase 4 to 8 or any hihgher number if you have enough
memory).  If extra workers works, it's definitely the lack of baked-in
concurrency in unicorn (this is by design).

So I suspect puma (or any other server) is better for your use case
anyways.

^ permalink raw reply	[flat|nested] 17+ messages in thread

* RE: Issue with Unicorn: Big latency when getting a request
  2014-11-14 18:34                           ` Eric Wong
@ 2014-11-14 22:36                             ` Roberto Cordoba del Moral
  0 siblings, 0 replies; 17+ messages in thread
From: Roberto Cordoba del Moral @ 2014-11-14 22:36 UTC (permalink / raw)
  To: Eric Wong; +Cc: unicorn-public@bogomips.org

I have tested with 5 workers and still the same issue.
It´s strange, If this is happening to everyone, it should be a more known problem. I have search everywhere in Internet and I couldn´t find anything related to it.
My guess is that probably I have something in my Rails code related to sessions or cookies that is handled in a different way in the browsers but it´s also related to the application server.
I don´t know. But although I feel really curious with the isssue and I would love to find it out, I think I will try with Puma.
Thank you so much for your time.

> Date: Fri, 14 Nov 2014 18:34:34 +0000
> From: e@80x24.org
> To: roberto.chingon@hotmail.com
> CC: unicorn-public@bogomips.org
> Subject: Re: Issue with Unicorn: Big latency when getting a request
> 
> Roberto Cordoba del Moral <roberto.chingon@hotmail.com> wrote:
> > I have installed Puma and it´s working.
> > It´s the combination of Unicorn and Chrome which is not working. I
> > don´t know why.
> 
> Just curious, can you try configuring "worker_processes 4" in unicorn
> (or maybe increase 4 to 8 or any hihgher number if you have enough
> memory).  If extra workers works, it's definitely the lack of baked-in
> concurrency in unicorn (this is by design).
> 
> So I suspect puma (or any other server) is better for your use case
> anyways.
 		 	   		  

^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2014-11-14 22:36 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-11-12 19:46 Issue with Unicorn: Big latency when getting a request Roberto Cordoba del Moral
2014-11-13  7:12 ` Roberto Cordoba del Moral
2014-11-13 21:03   ` Eric Wong
2014-11-14  6:46     ` Roberto Cordoba del Moral
2014-11-14  7:19       ` Eric Wong
2014-11-14  9:09         ` Roberto Cordoba del Moral
2014-11-14  9:32           ` Roberto Cordoba del Moral
2014-11-14 10:02             ` Eric Wong
2014-11-14 10:12               ` Roberto Cordoba del Moral
2014-11-14 10:15                 ` Roberto Cordoba del Moral
2014-11-14 10:28                   ` Eric Wong
2014-11-14 10:51                     ` Roberto Cordoba del Moral
2014-11-14 11:03                       ` Eric Wong
2014-11-14 11:15                         ` Roberto Cordoba del Moral
2014-11-14 15:01                         ` Roberto Cordoba del Moral
2014-11-14 18:34                           ` Eric Wong
2014-11-14 22:36                             ` Roberto Cordoba del Moral

Code repositories for project(s) associated with this public inbox

	https://yhbt.net/unicorn.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).