-
Notifications
You must be signed in to change notification settings - Fork 54
Question: Role of mincached? #50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
As I understand you're using DbUtils with MySQL as database and the PooledDb conection pool. The role of It's the number of connections that are at created in the pool and that will stay at minimum in the pool. Yes, you can view these connections with For instance, if you set up the pool like this, you should see 10 connections in the list: db = PooledDB(pymysql, mincached=10) When the program exists or It works similarly with other databases like PostgreSQL. I hope this answers your questions. |
Thank you very much. I see what you mean. It determines the number of connections at initialization and holds them. But it might automatically increase the number of connections as the number of requests gets larger, right? |
Right. The upper limit is controlled with the |
ok ,I got it |
Hello, first of all, I am not a native English speaker, so my expression may not be clear.
I want to determine the role of mincached
In the parameter introduction it is like this,
mincached: the initial number of idle connections in the pool (the default of 0 means no connections are made at startup)
But there is this sentence in the introduction of pooleddb:
Besides the pool of shared connections, you can also set up a pool of at least mincached and at the most maxcached idle connections that will be used whenever a thread is requesting a dedicated database connection or the pool of shared connections is not yet full.
Will pooleddb keep the connection based on mincached?
Can this connection be observed using show processlist?
Thank you so much
The text was updated successfully, but these errors were encountered: