librelist archives

« back to archive

Mysql connection pooling

Mysql connection pooling

From:
Axel Hansen
Date:
2010-11-10 @ 02:30
Hi everyone,

I'm trying to setup mysql connection pooling on a flask app and am wondering
if anyone has found a good solution.  I'm thinking of using PySQLPool (
http://packages.python.org/PySQLPool/), which is a module that runs in the
python process.  Apache/mod_wsgi is configured to prefork and use embedded
mode, so I'll end up with a version of the pool for each process, but I
don't this is a huge deal.  Has anyone used a similar setup?  Alternatively,
I could use something like sql relay which moves the pool to its own
process, but I'd rather avoid that extra complexity.

Thanks!

Re: [flask] Mysql connection pooling

From:
Robert Mela
Date:
2010-11-10 @ 15:35
Why not just use the connection pooling in SQLAlchemy?

On 11/9/10 9:30 PM, Axel Hansen wrote:
> Hi everyone,
>
> I'm trying to setup mysql connection pooling on a flask app and am 
> wondering if anyone has found a good solution.  I'm thinking of using 
> PySQLPool (http://packages.python.org/PySQLPool/), which is a module 
> that runs in the python process.  Apache/mod_wsgi is configured to 
> prefork and use embedded mode, so I'll end up with a version of the 
> pool for each process, but I don't this is a huge deal.  Has anyone 
> used a similar setup?  Alternatively, I could use something like sql 
> relay which moves the pool to its own process, but I'd rather avoid 
> that extra complexity.
>
> Thanks!

Re: [flask] Mysql connection pooling

From:
Dag Odenhall
Date:
2010-11-10 @ 12:10
Doesn't [Flask-]SQLAlchemy do pooling?