PyMySQLPool icon indicating copy to clipboard operation
PyMySQLPool copied to clipboard

Thread locking

Open terzano opened this issue 5 years ago • 5 comments

I am experiencing a thread lock and the application won't exit. I am using pyMySQL 0.9.3 and PyMySQLPool 1.0.6. Any suggestions? Thanks

terzano avatar Apr 24 '20 04:04 terzano

Hi @terzano

Can you provide a reproducible demo?

prprprus avatar Apr 28 '20 11:04 prprprus

I have the same problem

from pymysqlpool.pool import Pool


conf = {
    'host': 'remotehost',
    'port': 3306,
    'user': 'user',
    'password': '***',
    'db': 'mydb'
}
pool = Pool(**conf, min_size=1, max_size=3, timeout=10, autocommit=True)
pool.init()
pool.destroy()
# The script does not end
  • pymysql-pooling: 1.0.6
  • PyMySQL: 0.9.3
  • Python: 3.8

desarrolloinfotic avatar Jun 24 '20 21:06 desarrolloinfotic

+1

I fixed mine by reverting to python3.6..

gwasserfall avatar Jul 09 '20 14:07 gwasserfall

I think this is not a thread locking problem. It's just because there is a thread keeps running after the main thread is finished. And this problem is already solved by the PR #7 , but it's not updated at Pypi(https://pypi.org/project/pymysql-pooling/). I think Pypi update is needed. @prprprus

haydenkim01 avatar Aug 07 '20 02:08 haydenkim01

Worked for me when adding the daemon parameter in pool.py from PR #7 , thank you! How come is this still not updated at Pypi?

jcavalca avatar May 03 '21 13:05 jcavalca