I am acquiring two connections, doing some operation and then releasing them. In the finally block, i am also checking number of idle connections in the pool and it prints 2 continously. It is also visible from
It closes the connections only on close or terminate call and not automatically like it should according to the max_inactive_connection_lifetime param.
You are using a blocking loop, and so the event loop does not get a chance to run the inactive connection cleanup callbacks. Change time.sleep to await asyncio.sleep and you'll see it drop to zero.
0.29.0
16.1
YES
3.9.18
Linux-Ubuntu
No
Yes
asyncio
only.Based on this configuration, connection should be closed after 5 seconds of idleness.
I am acquiring two connections, doing some operation and then releasing them. In the finally block, i am also checking number of idle connections in the pool and it prints 2 continously. It is also visible from
It closes the connections only on
close
orterminate
call and not automatically like it should according to themax_inactive_connection_lifetime
param.Thanks