[CONPY-245] Connection pool too slow Created: 2023-01-31  Updated: 2023-02-01  Resolved: 2023-02-01

Status: Closed
Project: MariaDB Connector/Python
Component/s: Performance
Affects Version/s: 1.1.5
Fix Version/s: 1.1.6

Type: Bug Priority: Major
Reporter: Georg Richter Assignee: Georg Richter
Resolution: Fixed Votes: 0
Labels: None


 Description   

When running the benchmark suite using a connection pool (instead of establishing a new connection) it turns out that the connection time is significantly higher (depending on the number of connections in the pool) than performing a single connect.

This is caused by an unnecessary health check (sending MYSQL_PING) when iterating over the connections in the pool.

Instead iterating over the connections, we should keep a LRU list with unused connections, and an additional list for connection in use. When getting a connection from unused connections list, status should be checked via MYSQL_PING.



 Comments   
Comment by Georg Richter [ 2023-01-31 ]

Same issue was reported on Stackoverflow

Comment by Georg Richter [ 2023-02-01 ]

Fixed in commit 7daab2feb5b30a67732df2289b92d65737a36d08

Generated at Thu Feb 08 03:31:20 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.