Hi,

We have implemented web applications using Django and SQLAlchemy framework. 
We have distributed system in the company and some API used frequently.

We are facing a problem where MySQL connections reached a maximum limit.

In Django applications, we are using SQLAlchemy with *pool engine* and 
*scoped_session*. Also using *pool recycle* option as well.

There is custom Django middleware placed in application to remove the 
session at the end and *dispose the engine* as well.

But still, it leaves MySQL open connections.

Today I have reproduced and investigated problem locally and dig into 
library code. I found that instead of *disposing engine* if I *dispose 
engine's pool* then it actually remove connections.

I was expecting that disposing engine only will take care of connections.

I need some guidance from experts. Is this approach good? Should I go with 
this solution? Or is there better solution that can help me?

P.S, we are using *0.7.8 version of SQLAlchemy*. Unfortunately due to some 
issues I can not update the version.

Thanks in advance,
Ahmad Javed

-- 
SQLAlchemy - 
The Python SQL Toolkit and Object Relational Mapper

http://www.sqlalchemy.org/

To post example code, please provide an MCVE: Minimal, Complete, and Verifiable 
Example.  See  http://stackoverflow.com/help/mcve for a full description.
--- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" 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/sqlalchemy.
For more options, visit https://groups.google.com/d/optout.

Reply via email to