On Monday, January 5, 2015 2:17:35 AM UTC-8, Lin Jen-Shin wrote:
>
> Just downgraded to pg 0.17.1 and no luck either :( 
> Too bad I can't downgrade Rails in order to test this... 
> It's pretty reliable to reproduce this *on production*, 
> just restart the server and I shall see them happening. 
> Never ever successfully reproduced this on local nor 
> staging server though. Guess I can only debug this 
> on production.. Maybe it might be a good idea to tell 
> Sequel to reconnect while debugging this, so that 
> at least it's not giving people 500 error pages while 
> debugging? 
>
> The other thing I am wondering, we're also using 
> ActiveRecord, why we didn't see errors for them? 
>

I'm not sure.  Are you trying any hacks to share the connection pool 
between Sequel and ActiveRecord (I know some users are doing this, but it's 
pretty unsafe)?  Assuming not, it's possible that ActiveRecord 
automatically reconnects.  Sequel does not because it isn't safe to do in 
the general case.

You can use the connection_validator extension to check for valid 
connections before using them. This will automatically disconnect and 
create a new connection if the connection is not valid, since it does it at 
a point where it is known to be safe (directly after connection checkout).

If you are able to create a self-contained reproducible example, please 
post it and I'll investigate.

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