unicorn Ruby/Rack server user+dev discussion/patches/pulls/bugs/help
 help / color / mirror / code / Atom feed
From: Alex Sharp <ajsharp@gmail.com>
To: unicorn list <mongrel-unicorn@rubyforge.org>
Subject: Re: Strange quit behavior
Date: Tue, 23 Aug 2011 09:49:23 -0700	[thread overview]
Message-ID: <359EE87E6F2A4003BF4BCCCED94B44E2@gmail.com> (raw)
In-Reply-To: <20110823071205.GA27074@dcvr.yhbt.net>

On Tuesday, August 23, 2011 at 12:12 AM, Eric Wong wrote:
> Did you send any signals to 18862 while you were making this strace?
Not while, no. I had already sent a USR2 signal to this process (the old master), and then I attached strace to it. 

I'll try sending another USR2 signal next time while strace is attached. 
> >  I went ahead and ran strace with the same flags on the *new* master,
> > and saw a bunch of output that looked bundler-related:
> > https://gist.github.com/138344b5b19ec6ba1a4c
> > 
> > Even more bizarre, eventually the process started successfully :-/ Is
> > it possible this had something to do with strace de-taching?
> 
> That looks like pretty normal "require" behavior. strace would slow
>  down requires, a lot.
> 
> So this was with preload_app=true? While you're debugging problems,
> I suggest keeping preload_app=false and worker_problems=1 to minimize
> the variables.
Ok, I'll change those and report back. I'm guessing you meant worker_processes (not problems)? 
> 
> > You can see this in the unicorn.stderr.log file I included in the
> > gist. Check out these two lines in particular, which occur 25 minutes
> >  apart:
> > 
> > I, [2011-08-23T02:15:08.396868 #22169] INFO -- : Refreshing Gem list
> > I, [2011-08-23T02:40:16.621210 #22925] INFO -- : worker=1 spawned pid=22925
> 
> Wow, it takes 25 minutes to load your application? strace makes the
>  application /much/ slower, so I can actually believe it takes that long.
No, my mistake. Loading the application only takes about 10 seconds, and I only had strace attached to this process for a few seconds (less than 10). My point here was to show that the new master just spun for a good 25 minutes (presumably trying to load files over and over again), and then, seemingly out of nowhere, the new master came up and spawned the new workers. 
Next time I'll try to get attached with strace earlier and record more output.

> 
>  Loading large applications is very slow under Ruby 1.9.2, there's some
> pathological load performance issues fixed in 1.9.3.
> 
Yep, I've read about those, and I've seen Xavier's patch, but I don't think that's the issue here (though, it appears that's why the files attempting to be loaded in the strace output do not exist). Under normal circumstances, loading the app takes about 10 seconds and doesn't peg the cpu while doing it.
> 
> So you're saying /without/ strace, CPU usage _stays_ at 100% and _never_
> goes down?
Correct. 
> 
> 
> Generally, can you reproduce this behavior on a plain (empty) Rails
>  application with no extra gems?
> 
Good idea, I'll try that next.

- Alex 
_______________________________________________
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:[~2011-08-23 17:29 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-02 20:09 Strange quit behavior James Cox
2011-08-02 20:34 ` Alex Sharp
2011-08-02 21:54   ` Eric Wong
2011-08-05  4:09     ` Alex Sharp
2011-08-05  4:12       ` Alex Sharp
2011-08-05  8:07         ` Eric Wong
2011-08-17  4:26           ` Alex Sharp
2011-08-17  9:22             ` Eric Wong
2011-08-17 20:13               ` Eric Wong
2011-08-18 23:13                 ` Alex Sharp
2011-08-19  1:53                   ` Eric Wong
2011-08-19  9:42                     ` Alex Sharp
2011-08-19 16:51                       ` Eric Wong
2011-08-23  2:59                       ` Alex Sharp
2011-08-23  7:12                         ` Eric Wong
2011-08-23 16:49                           ` Alex Sharp [this message]
2011-08-23 20:23                             ` Eric Wong
2011-08-31  0:33               ` Eric Wong
2011-09-01 18:45                 ` Alex Sharp
2011-09-01 19:46                   ` Eric Wong
2011-09-01 19:57                   ` Alex Sharp
2011-09-01 20:26                     ` Eric Wong
2011-08-02 20:45 ` cliftonk
2011-08-02 21:53 ` Eric Wong
2011-08-02 22:46   ` James Cox
2011-08-02 23:08     ` Eric Wong
2011-08-02 23:49       ` Alex Sharp
2011-08-03  0:34   ` Eric Wong
2011-08-03  1:36     ` Eric Wong
2011-08-19 22:18     ` 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=359EE87E6F2A4003BF4BCCCED94B44E2@gmail.com \
    --to=ajsharp@gmail.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).