Add support for background eviction of idle objects
See original GitHub issueVersions
- Pool: 0.9.0.M1
- Database: PostgreSQL 11.4
- Java: 1.8.0_202"
- OS: mac OS/ GKE
Current Behavior
- Idle connections are never closed regardless of
maxIdleTime
option - It’s not clear what is the algorithm which decides how many idle connection to be kept.
- Inconsistent number of idle connections depending on
maxIdleTime
orinitialSize
options.
Steps to reproduce
I’ve created a simple repository which can be used to reproduce the issue - https://github.com/petromir/r2dbc-pool-idle-connection-issue
Expected behavior/code
- Cleaning idle connections once the
maxIdleTime
passes. - An explicit option for minimum idle connections.
Issue Analytics
- State:
- Created 2 years ago
- Comments:18 (17 by maintainers)
Top Results From Across the Web
PoolBuilder (Reactor Pool 1.0.0) - Project Reactor
Enable background eviction so that evictionPredicate is regularly applied to elements that are idle in the pool when there is no pool activity...
Read more >CleanOS: Limiting Mobile Data Exposure with Idle ... - USENIX
Together, our changes provide: (1) eviction of idle Java objects, (2) heuristics for identifying sensi- tive data without requiring app changes, (3) support...
Read more >Garbage Collection - Kubernetes
Garbage collection is a collective term for the various mechanisms Kubernetes uses to clean up cluster resources.
Read more >The AgroalDatasource class
The default is zero, meaning background validation is not performed. reapTimeout(Duration) - The duration for eviction of idle connections. The default is zero, ......
Read more >Configuring Infinispan caches
Managing JVM memory usage with eviction that automatically removes data from caches. Adding lifespan and maximum idle times to expire entries ...
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 FreeTop 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
Top GitHub Comments
as a side note, the reactor-pool activity-based eviction ALWAYS happens. Background eviction runs in addition to that if configured, but configuring background eviction doesn’t disable activity-based eviction.
This one is on our radar in preparation for the upcoming release. The polishing of this one required a broader brush.