Thanks for the help Jeremy - in the end we think it was a tcp issue because 
we were going over a nat gateway on our AWS cluster, all resolved now.

On Thursday, May 10, 2018 at 9:32:07 PM UTC-7, Jeremy Evans wrote:
>
> On Thursday, May 10, 2018 at 4:10:29 PM UTC-7, [email protected] 
> <javascript:> wrote:
>>
>> Figured out pulling the gem but we're still running into issues 
>> unfortunately. It's no longer a 'ThreadError: deadlock...', but seems to be 
>> failing in the same place.
>>
>> PG::ConnectionBad: PQconsumeInput() server closed the connection 
>> unexpectedly
>> This probably means the server terminated abnormally
>> before or while processing the request.
>>
>>
> The previous deadlock issue was a bug in Sequel (triggered when removing a 
> disconnected connection).  This looks like a standard disconnect error.  
> Sequel's behavior on a disconnect is to remove the connection from the 
> pool, and raise the error to the caller.  The connection_validator 
> extension may not help this in a couple cases:
>
> 1) The time since last checkout was not greater than the connection 
> validation timeout (you can set the timeout to -1 to validate on every 
> checkout).
> 2) The disconnect happened while the connection was checked out.
>
> If 2), you can't do much, other than using the :retry_on option to the 
> transaction and ensure the entire transaction block is idempotent if rolled 
> back and retried.
>
> With this particular issue, the database server (or some network device 
> between the app server and database server) disconnected the connection, so 
> there is nothing the client can do.  You'll need to figure out why the 
> server is disconnecting the client.
>
> This is unlikely to be an issue with Sequel itself.  If you believe 
> otherwise, please submit a minimal self contained example showing the 
> disconnection issue and I'll see if I can replicate and if so research why 
> it may be happening.
>
> 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 https://groups.google.com/group/sequel-talk.
For more options, visit https://groups.google.com/d/optout.

Reply via email to