I have encountered a problem during using DBUtils, pymysql
I have tried use PersistentDB with configs like
_pool = PersistentDb(
"creator": pymysql,
"host": X
"port": X,
"closeable": False,
"threadlocal": None,
"connect_timeout": 10
"read_timeout": 2
"write_timeout": 5)
When I try execute _pool.connection()
sometimes the connection will cost 2 seconds randomly.
Can anyone help me to solve this problem?
I have tried use PersistentDB with configs like
_pool = PersistentDb(
"creator": pymysql,
"host": X
"port": X,
"closeable": False,
"threadlocal": None,
"connect_timeout": 10
"read_timeout": 2
"write_timeout": 5)
When I try execute _pool.connection()
sometimes the connection will cost 2 seconds randomly.
Can anyone help me to solve this problem?