unicorn Ruby/Rack server user+dev discussion/patches/pulls/bugs/help
 help / color / mirror / code / Atom feed
From: Philipp Bruell <Philipp.Bruell@skrill.com>
To: "mongrel-unicorn@rubyforge.org" <mongrel-unicorn@rubyforge.org>
Cc: Charles Hornberger <Charles.Hornberger@skrill.com>
Subject: FreeBSD jail and unicorn
Date: Tue, 31 Jan 2012 17:22:45 +0000	[thread overview]
Message-ID: <CB4DE1F5.7D9%philipp.bruell@skrill.com> (raw)

Hello,

I'm using unicorn since a while, but now I try to run it the first time
inside a FreeBSD jail.

The initial start of unicorn works fine and it serves all the requests.
But if I want to restart it using the USR2 signal, it (more or less)
slowly starts using more and more CPU cycles. There is no error message in
the logs and it quite hard to reproduce that error. In 1 of 20 tries,
unicorn restarts correctly, but in the other cases I have to "kill -9" the
process. I haven't found anything that gives some indication.

I've tried unicorn version 4.1.1 and 4.2.0. The FreeBSD version is
8.2-STABLE amd64.

That my config:
---
listen "/home/deploy/staging/unicorn.sock"
pid "/home/deploy/staging/unicorn.pid"

preload_app true

stderr_path "/home/deploy/staging/unicorn.stderr.log"
stdout_path "/home/deploy/staging/unicorn.stdout.log"

before_fork do |server, worker|
  old_pid = "#{server.config[:pid]}.oldbin"
    if old_pid != server.pid
    begin
      process_id = File.read(old_pid).to_i
      puts "sending QUIT to #{process_id}"
      Process.kill :QUIT, process_id
    rescue Errno::ENOENT, Errno::ESRCH
    end
  end
end
---


I've tried without the before_fork-block, but I think, that's not the
critical part, since it doesn't reach to point where two master processes
exists. There is just the old master consuming all the CPU cycles.

Does someone ran into the same problem? Does someone has an idea?

Thanks in advance
Philipp

_______________________________________________
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:[~2012-01-31 18:29 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-31 17:22 Philipp Bruell [this message]
2012-01-31 18:39 ` FreeBSD jail and unicorn Eric Wong
2012-01-31 18:50   ` Charles Hornberger
2012-01-31 19:05     ` Eric Wong
     [not found]       ` <CB4EBD2A.7DF%philipp.bruell@skrill.com>
2012-02-01 18:14         ` Eric Wong
     [not found]           ` <CB5014D7.892%philipp.bruell@skrill.com>
2012-02-02 19:31             ` Eric Wong
2012-02-02 22:27               ` Eric Wong
2012-02-02 22:41                 ` Eric Wong
2012-02-02 23:41                   ` Eric Wong
2012-02-03  2:58                     ` Eric Wong
2012-02-07  5:21                       ` Eric Wong
2012-02-07  7:36                         ` Philipp Bruell
2012-02-07  9:59                           ` Charles Hornberger

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=CB4DE1F5.7D9%philipp.bruell@skrill.com \
    --to=philipp.bruell@skrill.com \
    --cc=Charles.Hornberger@skrill.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).