Thank you.  I added a DB:disconnect at the end of config.ru.  Something 
special about disconnecting the database so the database will stop 
disconnecting...

Should this not have been something that the 'connection validator' 
extension should have caught however?  My settings are such that all 
connections are validated, right?

On Monday, August 3, 2015 at 3:25:44 PM UTC-4, Jeremy Evans wrote:
>
> On Monday, August 3, 2015 at 12:05:19 PM UTC-7, Joel Collins wrote:
>>
>> We're trying to troubleshoot connection issues with our app, and I can't 
>> figure where to go from here.  The random DB errors seem to happen mostly 
>> for simple short queries, nothing long running, and not during queries that 
>> may be submitting strange data to the server (to rule out character 
>> encoding issues in the queries that fail...)
>>
>> Stack: Ruby 2.1.1 | phusion passenger 5.0.5 | sequel 4.24 | mysql2 0.3.18 
>> | mysql 5.5.38
>>
>
> Most common issue with this is that passenger is set to preload the 
> application, but you don't disconnect before fork.  This causes random 
> issues as the child processes share the same connection object.  I would 
> check that first.
>
> With unicorn, you would generally call DB.disconnect in before_fork, but 
> I'm not sure if passenger supports a before fork hook yet.  If not, calling 
> DB.disconnect after loading your models may fix things.
>
> 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