-
Type:
Bug
-
Status: Open
-
Resolution: Unresolved
-
Affects Version/s: 7.2.1 CE GA2
-
Fix Version/s: None
-
Labels:None
I have a module with service builder service and API.
This module use a DatasourceProvider referring portal properties "jdbc.abapp.*"
here is my portal properties :
...
jdbc.abapp.driverClassName=org.postgresql.Driver
jdbc.abapp.password=postgres
jdbc.abapp.url=jdbc:postgresql://localhost:5432/abapp
jdbc.abapp.username=postgres
...
The module work fine, client portlet communicate with it and datas are coming from the database.
But, each time I re-deploy the service module, the number of connections is raising (10 by 10 as the poolsize is 10).
I'm deploying in "deploy" folder of the server.
After a few deployments, I reach the limts of my PostgreSQL server and no more connections are created (" sorry, too many clients already") and therefore, the module can't serve any more datas :
... 2020-06-24 09:28:07.077 INFO [Refresh Thread: Equinox Container: ffe51164-3895-479e-8791-9429b32159e5][BundleStartStopLogger:39] STARTED service.abapp.api_1.0.0 [1066] 2020-06-24 09:28:09.225 INFO [Refresh Thread: Equinox Container: ffe51164-3895-479e-8791-9429b32159e5][BundleStartStopLogger:39] STARTED service.abapp.service_1.0.0 [1067] 24-Jun-2020 09:28:09.548 GRAVE [HikariPool-4 connection adder] org.postgresql.Driver.connect Connection error: org.postgresql.util.PSQLException: FATAL: désolé, trop de clients sont déjà connectés at org.postgresql.core.v3.ConnectionFactoryImpl.doAuthentication(ConnectionFactoryImpl.java:438) at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:222) at org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:49) at org.postgresql.jdbc.PgConnection.<init>(PgConnection.java:194) at org.postgresql.Driver.makeConnection(Driver.java:431) at org.postgresql.Driver.connect(Driver.java:247) at com.zaxxer.hikari.util.DriverDataSource.getConnection(DriverDataSource.java:112) at com.zaxxer.hikari.util.DriverDataSource.getConnection(DriverDataSource.java:118) at com.zaxxer.hikari.pool.PoolBase.newConnection(PoolBase.java:358) at com.zaxxer.hikari.pool.PoolBase.newPoolEntry(PoolBase.java:201) at com.zaxxer.hikari.pool.HikariPool.createPoolEntry(HikariPool.java:443) at com.zaxxer.hikari.pool.HikariPool.access$200(HikariPool.java:70) at com.zaxxer.hikari.pool.HikariPool$PoolEntryCreator.call(HikariPool.java:630) at com.zaxxer.hikari.pool.HikariPool$PoolEntryCreator.call(HikariPool.java:616) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) ...
Then, I'm forced to restart the portal or Postgres or killing database processes.
I tried with Tomcat pool, instead of Hikari, and the trouble is the same.
So, why deployment task doesn't reuse or release previous connections in the pool ?