prprprus / PyMySQLPool

PyMySQL-based database connection pool.
MIT License
60 stars 21 forks source link

Thread locking #14

Open terzano opened 4 years ago

terzano commented 4 years ago

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

prprprus commented 4 years ago

Hi @terzano

Can you provide a reproducible demo?

desarrolloinfotic commented 4 years ago

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
gwasserfall commented 4 years ago

+1

I fixed mine by reverting to python3.6..

haydenkim01 commented 4 years ago

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

jcavalca commented 3 years ago

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?