根据本文档:
智能生成操作后,套接字连接将继续共享。列出的示例适用于 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