Em 03-11-2017 07:02, Jeremy Evans escreveu:
On Friday, November 3, 2017 at 4:29:14 AM UTC+1, Tim Uckun wrote:

    How does Sequel handle disconnections now? Does it just throw up
    an error or does it keep trying for a while to reconnect?  If it
    was able to gracefully deal with disconnections would that solve
    your problem?


The same as it has for many years.  Unless you use connection_validator, if a disconnect error is detected, the connection is removed from the pool, and the error is reraised as retrying with a new connection is not safe in the general sense.  I don't think this affects Rodrigo's issue, since it is related to type OIDs, and reconnecting does not affect that.

That's right, this issue with disconnections was handled long ago in my application by using a connection validator. Before that, if I restarted the database for any reasons (such as updating some settings in postgresql.conf) it would raise tons of errors because there were quite some servers in the cluster each one holding quite a few connections in the pool. So we used to have hundreds of idle connections which meant it would raise hundred of errors eventually. I should probably use a small-sized connection pool in the application and connect to something like pgBouncer instead of talking directly to the database to reduce the amount of idle connections and unneccessary memory usage, but since I'm not currently experiencing any performance or scalability issues, I'm post-poning this to focus in other tasks of higher priority for the time being.

Cheers,
Rodrigo.

--
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