Avner Cohen <[email protected]> wrote:
> Eric,
> Thanks for the quick reply, and aplogies for not providing full info.
> I do have these set up, here is my full configuration:
> 
> # -*- encoding : utf-8 -*-
> worker_processes 4
> working_directory "."
> listen 3000
> timeout 120
> 
> preload_app true
> 
> before_fork do |server, worker|
>   defined?(ActiveRecord::Base) and ActiveRecord::Base.connection.disconnect!
> end
> 
> 
> after_fork do |server, worker|
>   defined?(ActiveRecord::Base) and ActiveRecord::Base.establish_connection
> end

Interesting.  I haven't kept up with changes in Rails over the
past few years.  Hopefully somebody else on the list, has...

Which database and adapter are you using?

Do you have anything else that opens a socket at application startup?
(e.g. memcache, redis, ..., especially anything that would interact
with ActiveRecord/Model)

Can you try just using one worker_process + preload_app=true and
doing "lsof -p" on both the PID of the master and single worker
to show open sockets (and any other FDs which may be inadvertantly
shared)?

The only stream socket which should be shared are the listeners.
_______________________________________________
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