unicorn Ruby/Rack server user+dev discussion/patches/pulls/bugs/help
 help / color / mirror / code / Atom feed
From: Eric Wong <normalperson@yhbt.net>
To: unicorn list <mongrel-unicorn@rubyforge.org>
Cc: Gleb Arshinov <gleb@pluron.com>
Subject: Re: Unicorn freezes, requests got stuck in the queue most likely
Date: Tue, 28 May 2013 17:20:36 +0000	[thread overview]
Message-ID: <20130528172036.GA9401@dcvr.yhbt.net> (raw)
In-Reply-To: <op.wxskbj1maya692@earth.site>

Alexander Dymo <adymo@pluron.com> wrote:
> In short:
> - we have two groups of workers:
>   - one serving long-running requests that take more than 10 sec, listening to a '/tmp/long_requests_unicorn.sock' socket
>   - another serving normal requests, listening to '/tmp/unicorn.sock' socket
> - nginx determines which request goes to which sockets.
> 
> This worked perfectly for 2 years. Looks like after we upgraded to
> unicorn 4.4, the normal requests started to get stuck in the queue.
> That happens randomly, several times per day. When that happens,
> requests wait for up to 7 seconds to be served. At that time most or
> all of the workers are available and not doing anything. Unicorn
> restart fixes the problem.

How are you determining requests get stuck for up to 7 seconds?
Just hitting the app?

How is the system (CPU/RAM/swap usage) around this time?

Are you using Raindrops::LastDataRecv or Raindrops::Watcher?
(If not and you're on Linux, please give them a try[1]).

Anything in the stderr logs?  Dying/restarted workers might cause
this.  Otherwise, I'd look for unexpected long-running requests
in your Rails logs.

> Has anyone seen something freezes like that? I'd appreciate any help
> with debugging and understanding this problem.

I certainly have not.  Did you perform any other upgrades around this
point?

Can you try reverting to 4.3.1 (or earlier, and not changing anything else)
and see if the problem presents itself there?

Also, which OS/version is this?


[1] http://raindrops.bogomips.org/
_______________________________________________
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

  reply	other threads:[~2013-05-28 17:20 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-28 11:17 Unicorn freezes, requests got stuck in the queue most likely Alexander Dymo
2013-05-28 17:20 ` Eric Wong [this message]
2013-05-28 18:13   ` Alexander Dymo
2013-05-30  0:12     ` Eric Wong
2013-05-28 18:56 ` Troex Nevelin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://yhbt.net/unicorn/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130528172036.GA9401@dcvr.yhbt.net \
    --to=normalperson@yhbt.net \
    --cc=gleb@pluron.com \
    --cc=mongrel-unicorn@rubyforge.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).