- changed status to wontfix
connetion are not disconntected when set pool_size=0 (documentation)
Issue #1164
resolved
version tested: SQLAlchemy 0.5.0rc1
I use engine like this, I set pool_size=0,
engine = create_engine('mysql://root:password@localhost/test', pool_size=0, max_overflow=2, echo=True)
I like the behavior will be: establish a connection with mysql when I need it and release all connections when I close all sessions. I don't need the pool to keep "sleeping" connetions.
but it sames that all the two connections don't release at all.
If I set pool_size >= 1, the pool works correctly.
Is it a bug or not?
Thanks!
Comments (6)
-
repo owner -
Account Deleted - attached sqlalchemy-pool_size-doc.diff
Mention special meaning of pool_size=0 and recommend NullPool in documentation of pool_size parameters.
-
Account Deleted - removed status
- changed status to open
I think the special meaning of pool_size=0 is a deficiency of the documentation; patch attached.
-
repo owner - changed milestone to 0.6.2
- changed title to connetion are not disconntected when set pool_size=0 (documentation)
-
repo owner - changed status to resolved
-
repo owner - removed milestone
Removing milestone: 0.6.2 (automated comment)
- Log in to comment
thats not a QueuePool use case. use the NullPool which doesn't do any pooling (just opens and closes connections).