Re: CannotAcquireResourceException in Junit

From: rob stone <floriparob(at)gmail(dot)com>
To: Abhra Kar <abhra(dot)kar(at)gmail(dot)com>, Rob Sargent <robjsargent(at)gmail(dot)com>
Cc: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: CannotAcquireResourceException in Junit
Date: 2018-01-30 11:52:57
Message-ID: 1517313177.3061.7.camel@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Elson Vaz 2018-01-30 13:40:45 Alter view with dependence without drop view!
Previous Message Findlay, Thomas C 2018-01-30 11:32:01 pgAdmin 4 loading shapefiles