Iñaki Baz Castillo <[email protected]> wrote:
> El Martes, 5 de Enero de 2010, Eric Wong escribió:
> > > So I'm totally lost. However if I test my databases in "before_fork" then
> > > I  see N number of DB connections (N = workers num).
> > 
> > How are you testing the database?  `` or via Ruby code?
> 
> I use Ruby Sequel ORM.
> I've also added the following code to before_fork:
> 
>   File.open("/tmp/lalala", "ab") do |f|
>     f.puts "My PID is #{$$}"
>   end
> 
> I confirm that there are two lines printed in that file when Unicorn starts 
> (being 2 the number of workers). Is it the expected behavior?

Yes, before_fork and after_fork are both called for every worker forked.

-- 
Eric Wong
_______________________________________________
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