On Sunday, November 11, 2012 6:43:13 PM UTC-8, Steven McPhillips wrote:

> Hi,
>
> I have an interesting issue with one of my Ruby+Sequel web apps. The app 
> is very infrequently used, and the (MySQL) dba employs fairly aggressive 
> connection pruning. This means that  connections in Sequel's db pool are 
> almost always invalidated when a request comes through (because MySQL has 
> disconnected them). My immediate thought was to reduce the max_connections 
> option (Sequel.connect) to 1, but I have a feeling 
> (confirmed?<https://groups.google.com/d/topic/sequel-talk/yb_u0uDiCDk/discussion>
>  I've 
> been lazy and not tested for myself) doing so would mean the app would only 
> have 1 active db connection.
>
> So my question: can I configure Sequel to not pool connections, but still 
> ensure each request can access a (freshly minted as required) db 
> connection, perhaps with an upper limit on maximum active connections? Am I 
> just getting confused between db.max_connections vs db.pool.max_connections?
>

You probably should use the connection_validator extension that ships with 
Sequel 3.41.0 
(http://sequel.rubyforge.org/rdoc-plugins/files/lib/sequel/extensions/connection_validator_rb.html).

Thanks,
Jeremy

-- 
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/-/lw3XXhZaVsMJ.
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