Details
-
Bug
-
Status: Closed (View Workflow)
-
Critical
-
Resolution: Not a Bug
-
1.1.10
-
LINUX, Python 3.11.2
Server version: 10.11.6-MariaDB-0+deb12u1 Debian 12
version conpy: mariadb 1.1.10
using mode: thread_handling = pool-of-threads
A flask webapp, using mariadb.ConnectionPool for pooling connection
http server : gunicorn (10 workers and with threads class of worker (gevent or gthread) )LINUX, Python 3.11.2 Server version: 10.11.6-MariaDB-0+deb12u1 Debian 12 version conpy: mariadb 1.1.10 using mode: thread_handling = pool-of-threads A flask webapp, using mariadb.ConnectionPool for pooling connection http server : gunicorn (10 workers and with threads class of worker (gevent or gthread) )
-
Python 3.11.2
Description
- for each worker, and instance of my webapp is created.
- each instance create a pool (mariadb.ConnectionPool) named 'poolName_' + worker.pid, on the same DB with the same user.
worker1 > pool1 >>- connections 1,2,3,4,5,6,7,8,9,10
worker2 > pool2 >>- connections 11,12,13,14,15,16,17,18,19,20
worker3 > pool3 >>- connections 21,22,23,24,25,26,27,28,29,30
so worker1 calling pool1.get-connection should return only connections 1,2,3,4,5,6,7,8,9,10
When looking to my logs i can see that :
1/ calling dbpool.get_connection() return an connection from other pool!!
worker2 > pool2 >>- connections 1,3,8,12,21,22,15
worker3 > pool3 >>- connections 2,3,12,25
ccl: pools share connections
2/pool object are used by different workers (you can say its a flask pb)
worker2 > pool2
worker3 > pool2
ccl: workers share pools
Is it a bug or a feature?
is it a problem for production use?
Hi Georg, if you need more precisions don't hesitate...