From: Eric Wong <normalperson@yhbt.net>
To: unicorn list <mongrel-unicorn@rubyforge.org>
Subject: Re: unicorn 1.1.x never-ending listen loop IOError exceptions
Date: Tue, 22 Mar 2011 14:39:05 -0700 [thread overview]
Message-ID: <20110322213905.GA23207@dcvr.yhbt.net> (raw)
In-Reply-To: <AANLkTin18jkoaMkj-kZf-Seqw8hz8aEQ0bZqL_Jf79xo@mail.gmail.com>
David Nghiem <david@zendesk.com> wrote:
> We run unicorn 1.1.5 behind nginx under Ruby Enterprise Edition
> 2011.02. We're using UNIX sockets instead of TCP sockets.
>
> Once in a while, one worker will throw exceptions in a loop, taking up
> lots of CPU and log space. Killing the worker removes the problem.
> Other workers are not affected.
>
> Here's the exception:
>
> E, [2011-01-10T10:13:13.518795 #15209] ERROR -- : Unhandled listen
> loop exception #<IOError: closed stream>.
> E, [2011-01-10T10:13:13.518881 #15209] ERROR -- :
> /data/zendesk/releases/alpha/vendor/bundle/ruby/1.8/gems/unicorn-1.1.5/lib/unicorn.rb:732:in
> `select'
>
> I don't get any other exceptions. I've found other people have this
> "IOError: closed stream" error coupled with "Errno::EMFILE" but we
> have plenty of file-descriptors left.
No Errno::EBADF errors at all?
> Here's an lsof dump of the worker:
>
> COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME
<snip> It looks like log reopening failed, below:
> ruby 15209 zendesk 1w REG 252,0 0
> 3015360 /data/zendesk/log/unicorn.stdout.log
> ruby 15209 zendesk 2w REG 252,0 24585
> 3015203 /data/zendesk/log/unicorn.stderr.log-20110110 (deleted)
> ruby 15209 zendesk 3w REG 252,0 61617590073
> 3015097 /data/zendesk/log/unicorn.log-20110110 (deleted)
Permissions issue during log rotation? Are you doing "killall -USR1
unicorn" by any chance or sending a bunch of USR1 signals faster than
unicorn can process them?
Try just sending one USR1 to the master process and letting the master
signal the workers.
--
Eric Wong
_______________________________________________
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
next prev parent reply other threads:[~2011-03-22 23:49 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-22 19:19 unicorn 1.1.x never-ending listen loop IOError exceptions David Nghiem
2011-03-22 21:39 ` Eric Wong [this message]
2011-03-23 0:04 ` David Nghiem
2011-03-23 1:09 ` Eric Wong
[not found] ` <AANLkTim3xZMKxcmQzPjcB7vrJKiHoc2f8WoU8RatrDum@mail.gmail.com>
2011-03-29 16:24 ` Eric Wong
2011-03-29 16:54 ` [PATCH] add examples/logrotate.conf Eric Wong
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=20110322213905.GA23207@dcvr.yhbt.net \
--to=normalperson@yhbt.net \
--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).