Pool min size
See original GitHub issueHi. It seems that min
parameter of Pool configuration is not used.
Code
let pool = new Pool({
database: connectionConfig.database,
port: connectionConfig.port,
nolimit: connectionConfig.nolimit,
user: connectionConfig.user,
password: connectionConfig.password,
host: connectionConfig.host,
min: 1
});
Expected: At least one connection is always established
Actual:
I receive a removed
event with pool.totalCount
equals to zero. After that my process is terminated.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:2
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Why do we need to set Min pool size in ConnectionString
If MinPoolSize is either not specified in the connection string or is specified as zero, the connections in the pool will be closed...
Read more >5.3. Minimum pool size JBoss Enterprise Application ...
The min-pool-size data source parameter defines the minimum size of the connection pool. The default minimum is zero connections, so if a minimum...
Read more >15 Small Backyard Pool Ideas (With Photos of Tiny Pools)
While the sizes and dimensions of pools vary, anything that's about 10 feet by 10 feet or smaller is typically considered a small...
Read more >Performance issue when Min Pool Size set to 0 or 1
The biggest problem with a min connection > 0 is the potential for stale sessions. This can cause a JDBC service failure if...
Read more >About Controlling the Pool Size in UCP - Oracle Help Center
The minimum pool size property specifies the minimum amount of available connections and borrowed connections that a pool maintains. A connection pool always ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I also have a requirement to maintain a given, minimum number of connections to the database. Is there a known workaround to achieve this? I noticed that PgBouncer supports this but i prefer to use node-postgres if a viable workaround is available.
Strange, I think it can be useful: e.g. I want to know that there is a problem with a connection to DB before my app come in a state when it needs to perform a query. Right now when I detect that
pool.totalCount
is zero, I sendSELECT now()
to DB to maintain the connection.