[CONPY-73] Error from connection pool: No more connections from pool 'web-app' available Created: 2020-06-09  Updated: 2021-10-14  Resolved: 2021-10-11

Status: Closed
Project: MariaDB Connector/Python
Component/s: Documentation, Generic
Affects Version/s: 1.0.0
Fix Version/s: N/A

Type: Bug Priority: Critical
Reporter: Geoff Montee (Inactive) Assignee: Jacob Moorman (Inactive)
Resolution: Fixed Votes: 0
Labels: None

Attachments: File connection_pool_test2.py    
Issue Links:
Relates
relates to CONPY-40 connection pool issues Closed
relates to CONPY-72 Crash in Connector/Python's MrdbPool_... Closed

 Description   

I've attached a simple test program that fails with an error.

For example:

$ python3 ./connection_pool_test2.py 
Error: No more connections from pool 'web-app' available

This is with the following environment:

$ python3 --version
Python 3.6.9
$ cat /etc/os-release 
NAME="Ubuntu"
VERSION="18.04.4 LTS (Bionic Beaver)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 18.04.4 LTS"
VERSION_ID="18.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=bionic
UBUNTU_CODENAME=bionic

This occurred with MariaDB Connector/Python 1.0.0, which was installed via:

$ tar -xvzf mariadb-connector-python-1.0.0.tar.gz
$ pip3 install mariadb-1.0.0



 Comments   
Comment by Georg Richter [ 2020-06-10 ]

We don't yet add automatically connections to the pool - the current implementation is similiar to MySQL Connector/Python.
When running the attached script with MySQL Connector/Python , the following error is returned:

Error: Failed getting connection; pool exhausted

So with current implementation you have to add connections first with pool.add_connection()

Comment by Andrew Hutchings (Inactive) [ 2020-06-10 ]

Confirmed. This appears to be due to the pool connections being made at init time and not reset when the configuration changes, set_config only appears to store the configuration changes but not apply them.

Comment by Andrew Hutchings (Inactive) [ 2020-06-15 ]

georg If this is the case, the Sphinx docs for the API should probably be updated to mention what you can and cannot use this call for. Maybe using a ".. note::"?

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