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 - [email protected]
http://rubyforge.org/mailman/listinfo/mongrel-unicorn
Do not quote signatures (like this one) or top post when replying

Reply via email to