A connector in charge of persisting context data sources into other third-party databases and storage systems, creating a historical view of the context
$ psql -h localhost -U postgres
SELECT datname, count(*) FROM pg_stat_activity
WHERE state = 'idle' GROUP BY datname;
This PR allows change:
maxPoolSize
maxPoolIdle
minPoolIdle
minPoolIdleTimeMillis
And fixes default initial values for:
maxPoolSize: 3
maxPoolIdle: 2
minPoolIdle: 0
minIddleTimeMillis: 10000
With the following meanings:
// Sets the cap on the number of objects that can be allocated by the pool (checked out to clients, or idle awaiting checkout) at a given time.
gPool.setMaxActive(this.maxPoolSize);
// Sets the cap on the number of "idle" instances in the pool.
gPool.setMaxIdle(this.maxPoolIdle);
// Sets the minimum number of objects allowed in the pool before the evictor thread (if active) spawns new objects.
gPool.setMinIdle(this.minPoolIdle);
// Sets the minimum amount of time an object may sit idle in the pool before it is eligible for eviction by the idle object evictor (if any)
gPool.setMinEvictableIdleTimeMillis(this.minPoolIdleTimeMillis);
// Sets the number of milliseconds to sleep between runs of the idle object evictor thread
gPool.setTimeBetweenEvictionRunsMillis(this.minPoolIdleTimeMillis*3)
Related https://github.com/telefonicaid/fiware-cygnus/issues/2366
doc about GenericObjectPool https://commons.apache.org/proper/commons-pool/apidocs/org/apache/commons/pool2/impl/GenericObjectPool.html
This PR allows change:
And fixes default initial values for:
With the following meanings: // Sets the cap on the number of objects that can be allocated by the pool (checked out to clients, or idle awaiting checkout) at a given time. gPool.setMaxActive(this.maxPoolSize);
// Sets the cap on the number of "idle" instances in the pool. gPool.setMaxIdle(this.maxPoolIdle);
// Sets the minimum number of objects allowed in the pool before the evictor thread (if active) spawns new objects. gPool.setMinIdle(this.minPoolIdle);
// Sets the minimum amount of time an object may sit idle in the pool before it is eligible for eviction by the idle object evictor (if any) gPool.setMinEvictableIdleTimeMillis(this.minPoolIdleTimeMillis);
// Sets the number of milliseconds to sleep between runs of the idle object evictor thread gPool.setTimeBetweenEvictionRunsMillis(this.minPoolIdleTimeMillis*3)
how to see number of idle connections: