question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add support for background eviction of idle objects

See original GitHub issue

Versions

  • Pool: 0.9.0.M1
  • Database: PostgreSQL 11.4
  • Java: 1.8.0_202"
  • OS: mac OS/ GKE

Current Behavior

  1. Idle connections are never closed regardless of maxIdleTime option
  2. It’s not clear what is the algorithm which decides how many idle connection to be kept.
  3. Inconsistent number of idle connections depending on maxIdleTime or initialSize 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

  1. Cleaning idle connections once the maxIdleTime passes.
  2. An explicit option for minimum idle connections.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:18 (17 by maintainers)

github_iconTop GitHub Comments

1reaction
simonbaslecommented, May 7, 2021

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.

0reactions
mp911decommented, May 11, 2021

This one is on our radar in preparation for the upcoming release. The polishing of this one required a broader brush.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found