unicorn Ruby/Rack server user+dev discussion/patches/pulls/bugs/help
 help / color / mirror / code / Atom feed
* Unicorn workers freeze from time to time
@ 2014-01-24 11:21 Artem Pyanykh
  2014-01-24 16:37 ` Michael Fischer
  0 siblings, 1 reply; 2+ messages in thread
From: Artem Pyanykh @ 2014-01-24 11:21 UTC (permalink / raw)
  To: mongrel-unicorn; +Cc: artem.pyanykh

A couple of days ago I noticed a strange thing - from time to time server stops processing request for some time. At the `top` output it looks like this:

* ten Unicorn workers process requests;
* then, for some reason, they stop doing anything. I mean, all ten workers have 'sleeping' status;
* for a ten-fifteen seconds they sleep;
* and then suddenly all then workers at the same time start processing requests (lots of them were queued for 10s);

I have the following setup:
nginx, unicorn 4.6.2, postgres, redis for sessions and cache.

My first thought was to blame redid (because if redis doesn't give sessions, all process will wait for it), but it seems it is not the case, because while unicorn workers freeze, redis serving other processes that do background jobs.

I don't understand what is the reason of this strange behaviour.

If someone have some thoughts on the matter I would gladly check it. If you need additional information - just tell me what to do, and I'll try to provide it.

Related question on StackOverflow - http://stackoverflow.com/questions/21329413/unicorn-workers-freeze-from-time-to-time

----------------
Best regards,
Artem Pyanykh



_______________________________________________
Unicorn mailing list - mongrel-unicorn@rubyforge.org
http://rubyforge.org/mailman/listinfo/mongrel-unicorn
Do not quote signatures (like this one) or top post when replying

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

* Re: Unicorn workers freeze from time to time
  2014-01-24 11:21 Unicorn workers freeze from time to time Artem Pyanykh
@ 2014-01-24 16:37 ` Michael Fischer
  0 siblings, 0 replies; 2+ messages in thread
From: Michael Fischer @ 2014-01-24 16:37 UTC (permalink / raw)
  To: unicorn list; +Cc: artem.pyanykh

On Fri, Jan 24, 2014 at 3:21 AM, Artem Pyanykh <artem.pyanykh@gmail.com> wrote:
> A couple of days ago I noticed a strange thing - from time to time server stops processing request for some time. At the `top` output it looks like this:
>
> * ten Unicorn workers process requests;
> * then, for some reason, they stop doing anything. I mean, all ten workers have 'sleeping' status;

What does strace(8) say they're doing before they go to sleep?

--Michael
_______________________________________________
Unicorn mailing list - mongrel-unicorn@rubyforge.org
http://rubyforge.org/mailman/listinfo/mongrel-unicorn
Do not quote signatures (like this one) or top post when replying

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

end of thread, other threads:[~2014-01-24 17:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-01-24 11:21 Unicorn workers freeze from time to time Artem Pyanykh
2014-01-24 16:37 ` Michael Fischer

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

	../../../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).