We are connecting to a MySQL database using SQLAlchemy.
eng = create_engine(uri, pool_size=25, pool_recycle=60, pool_pre_ping=True)
When we monitor the pool, we see that the number of checkedin connections keep increasing while the number of checkedout connections is pretty stable (around 3, for instance).
After a while, the number of checkedin connections reaches the maximum and the software starts to fail TimeoutError: QueuePool limit.
I had already investigated and we call close at the end of every session. We are using a try-finally block for every session usage.
Did someone face this problem? Do you have ideas on how to investigate what connections are hung?