Em segunda-feira, 22 de outubro de 2012 19h34min26s UTC-2, Jeremy Evans 
escreveu:
>
> On Monday, October 22, 2012 11:47:29 AM UTC-7, Rodrigo Rosenfeld Rosas 
> wrote:
>>
>> I had to restart the PostgreSQL service in our database server and the 
>> Rails apps using Sequel stopped working. 
>>
>> Is there a way to instruct Sequel to try to reconnect on such cases? One 
>> that works both for MRI and JRuby? 
>>
>>
> Sequel should be removing the connections from the pool, reraising the 
> exceptions, and creating new connections as needed in the future.  So it's 
> expected that some DatabaseDisconnectErrors will be raised, but Sequel 
> should recover, assuming that it correctly recognizes the disconnections 
> (which it should on the postgres and jdbc/postgres adapters).  If that 
> isn't what you experienced, please try to put together a reproducible test 
> case and I'll take a look.
>

But this is a problem for our setup as we have a cluster with a dozen 
servers and there will be as many reported errors as there are servers in 
the cluster and all of them end up in our SLA errors log which affects our 
contract :(

Is there a way of just instructing Sequel to query something like "select 
1" before attempting to use the connection? Hibernate has an option to do 
so and it works. Our application is a mix of a Grails and a Rails app. We 
only had to restart the Rails servers of the cluster as the Grails ones 
that used Hibernate with this option enabled didn't experience any issues.

We'd like to be able to do something like with Sequel as well.

Would that be possible?

Thanks,
Rodrigo.

-- 
You received this message because you are subscribed to the Google Groups 
"sequel-talk" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/sequel-talk/-/dxWox-TsEF0J.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sequel-talk?hl=en.

Reply via email to