Uploaded image for project: 'MariaDB Connector/Python'
  1. MariaDB Connector/Python
  2. CONPY-114

Can't add connection to pool

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Not a Bug
    • Affects Version/s: 1.0.1
    • Fix Version/s: N/A
    • Component/s: Documentation
    • Labels:
      None

      Description

      Hi Georg,

      I created a pool with only 2 pre connections with

      import mariadb
      conn_parameter = {'host': .... }
       
      pool = mariadb.ConnectionPool(pool_name='test', pool_size=2, **conn_parameter)
      

      Checked the max_size of pool

      print(pool.max_size)
      # Returned 64
      

      But, if I try to add some new connection to pool,

      new_db = mariadb.connect(**conn_parameter)
      pool.add_connection(new_db)
      

      I get the exception mariadb.PoolError: Couldn't add connection to pool 'test' (no free slot available).

      Am I missing something?

        Attachments

          Activity

            People

            Assignee:
            georg Georg Richter
            Reporter:
            lucianobarcaro Luciano Barcaro
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Git Integration