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: Wed, 23 Mar 2011 01:09:35 +0000 [thread overview]
Message-ID: <20110323010935.GA25934@dcvr.yhbt.net> (raw)
In-Reply-To: <AANLkTim=xPJ6Mo9160FvCBzh+RwLnsiOkb51WAhJmmV0@mail.gmail.com>
David Nghiem <david@zendesk.com> wrote:
> On Tue, Mar 22, 2011 at 2:39 PM, Eric Wong <normalperson@yhbt.net> wrote:
> > No Errno::EBADF errors at all?
>
> I didn't check before or after the block of Errno::IOError errors,
> there were enough IOError logs to fill up 40gb of disk. I'll capture
> the entire deleted log next time.
Yikes. The first few lines of error messages should be enough.
> >> 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.
>
> Are the IOError exceptions and failure to rotate logs related? My
> wild guess was this specific worker's unix socket got corrupted
> somehow.
There's a good possibility. The USR1 signal closes a pipe we normally
select() on. The closed pipe triggers a wakeup from select(), which
triggers the log reopening (and reopening of the pipe).
Do you see: "worker=$NUM done reopening logs" messages in your
logs?
Another explanation is somehow you have a library that does something
along the lines of:
ObjectSpace.each_object(IO) { |io| io.close unless io.closed? }
--
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-23 1:16 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
2011-03-23 0:04 ` David Nghiem
2011-03-23 1:09 ` Eric Wong [this message]
[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=20110323010935.GA25934@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).