每本文档:
http://www.modrails.com/documentation/Users%20guide%20Nginx.html#_smart_spawning_gotcha_1_unintentional_file_descriptor_sharing
插座连接继续智能产卵操作之后被共享。 所列的例子是用于Memcached的。
难道一个有类似的ActiveRecord的重新连接在这种情况下呢? 就像是:
PhusionPassenger.on_event(:starting_worker_process) do |forked|
if forked
# We're in smart spawning mode.
ActiveRecord.establish_connection(...)
else
# We're in conservative spawning mode. We don't need to do anything.
end
end