tomyeh / postgresql

Dart Postgresql database library.
https://quire.io
BSD 2-Clause "Simplified" License
15 stars 7 forks source link

Wait several milliseconds if the number of connections exceed certain number but not maxConnections #16

Closed tomyeh closed 3 years ago

tomyeh commented 3 years ago

In a system with heavy load, it can allow all connections allowed (maxConnections). However, if many of these connections are short lived, we can reduce number of connections by waiting a while when the number of connections exceeds a certain number, say, freeConnections.

In other words, the connections are likely to release before we allocate a new one.