On Friday, October 10, 2014 7:36:07 AM UTC-7, binarypaladin wrote:
>
> It looks like Passenger does have a similar hook. I added an initializer 
> that looks like so:
>
> if defined?(PhusionPassenger)
>   PhusionPassenger.on_event(:starting_worker_process) do |forked|
>     if forked
>       Sequel::DATABASES.each { |db| db.disconnect }
>     end
>   end
> end
>

I think that's an after fork hook, not a before fork hook.  I recommend 
disconnecting before fork, though what you have may work.
 

> Since the problem is intermittent I won't know if this solves it for a 
> while, but it seemed to pop up a lot after the server was idle for a while 
> which leads me to believe workers were being cleaned up and new ones were 
> being spawned and then we'd hit issues with each work before it went away.
>

OK.  Let me know if the error still occurs.

Thanks,
Jeremy

-- 
You received this message because you are subscribed to the Google Groups 
"sequel-talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sequel-talk.
For more options, visit https://groups.google.com/d/optout.

Reply via email to