05bit / peewee-async

Asynchronous interface for peewee ORM powered by asyncio
http://peewee-async-lib.readthedocs.io
MIT License
729 stars 98 forks source link

The connection pool cannot create a new connection after asyncio.CancelledError is raised when connecting to the database #254

Open lky1937 opened 3 months ago

lky1937 commented 3 months ago

Hi, I use Python 3.8, peewee_async version is v0.10.0, if asyncio.CancelledError exception occurs when connecting to the database, the connection pool can no longer create new connections available (because old connections are not released). I see that the Exception caught in line 741 of the source code is exception instead of BaseException, and I feel that this causes the above problem.

kalombos commented 3 months ago

Could you try the latest version ? Connection management has been rewritten. Also have a look at #207 for more information about cancellation.

lky1937 commented 3 months ago

Could you try the latest version ? Connection management has been rewritten. Also have a look at #207 for more information about cancellation.

Thank you for your reply, I will try the new version.