I ran into an issue recently where some code was obtaining a connection from a pool and in certain circumstances the connection wasn't being closed, eventually resulting in a mysql.connector.errors.PoolError: Failed getting connection; pool exhausted error. According to the documentation, when closing a pooled connection, this just returns the connection to the pool for re-use:
"To release a pooled connection obtained from a connection pool, invoke its close() method, just as for any unpooled connection. However, for a pooled connection, close() does not actually close the connection but returns it to the pool and makes it available for subsequent connection requests."
The code can be fixed to ensure the connection is closed, but as a general question if a connection isn't closed (returned to the pool), is it safe to assume it will never "timeout", instead remaining permanently claimed and unavailable for use again from the pool? Looking at the connection pooling source I can't see anything to suggest otherwise