[sqlalchemy] Closing pool connections

2014-09-25 Thread Thierry Florac
Hi, I have a multi-threaded web application using SQLAlchemy connections pool. As soon as a connection is opened, it's maintained opened in the pool even if it's not used anymore. On a long run, this can consume too much unnecessary connections and database server resources. So what I'm actually

Re: [sqlalchemy] Closing pool connections

2014-09-25 Thread Claudio Freire
On Thu, Sep 25, 2014 at 5:33 AM, Thierry Florac tflo...@gmail.com wrote: Hi, I have a multi-threaded web application using SQLAlchemy connections pool. As soon as a connection is opened, it's maintained opened in the pool even if it's not used anymore. On a long run, this can consume too much

Re: [sqlalchemy] Closing pool connections

2014-09-25 Thread Michael Bayer
On Sep 25, 2014, at 4:33 AM, Thierry Florac tflo...@gmail.com wrote: Hi, I have a multi-threaded web application using SQLAlchemy connections pool. As soon as a connection is opened, it's maintained opened in the pool even if it's not used anymore. On a long run, this can consume too much

Re: [sqlalchemy] Closing pool connections

2014-09-25 Thread Thierry Florac
Hi Michael, My first problem is that I have to deal with Oracle instead of PostgreSQL, so using PGBouncer is not an option :-( Moreover, what I need is not to be able to create a new connection each time it's accessed from the pool, but to be able to close a connection if it's unused for a given