Re: CannotAcquireResourceException in Junit - Mailing list pgsql-general

From rob stone
Subject Re: CannotAcquireResourceException in Junit
Date
Msg-id 1517313177.3061.7.camel@gmail.com
Whole thread Raw
In response to Re: CannotAcquireResourceException in Junit  (Abhra Kar <abhra.kar@gmail.com>)
List pgsql-general

On Tue, 2018-01-30 at 15:41 +0530, Abhra Kar wrote:
> Hi,
>        Sorry for late reply. Below options I tried --- 
> 1>pg_terminate_backend --> Successful execution.
> 2> Increase max_connection to 900 in
> /var/lib/pgsql/9.5/data/postgresql.conf .After modify restart psql
> service--- 
> service postgresql-9.5 start
> service postgresql-9.5 stop
> 
> Then execute select * from pg_stat_activity it shows 2 connections.
> 
> 
> 3>set cp3p0 options ----           
> com.mchange.v2.c3p0.ComboPooledDataSource cpds = new
> ComboPooledDataSource();
>   cpds.setMaxPoolSize(1000);
>             cpds.setMaxStatements(0);
>             cpds.setInitialPoolSize(50);
>             cpds.setAcquireIncrement(5);
>             cpds.setAcquireRetryAttempts(5);
> 
> 
> But the problem still persist.Please provide suggestion.
> 
> Regards,
> Abhra
> 



The stack trace you sent with your original post shows hibernate
crashing as it has no connection string.
You are using hibernate as the go between the RDBMS and your app.
The problem is more than likely in your c3p0 package.
I haven't a clue what it is supposed to do, but my guess is that the
faulty code is there, not with your configuration parameters.

My 0.02 worth.
HTH,
Rob


pgsql-general by date:

Previous
From: "Findlay, Thomas C"
Date:
Subject: pgAdmin 4 loading shapefiles
Next
From: Elson Vaz
Date:
Subject: Alter view with dependence without drop view!