pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: rob stone <floriparob@gmail.com>
To: Abhra Kar <abhra.kar@gmail.com>
To: Rob Sargent <robjsargent@gmail.com>
Cc: pgsql-general@postgresql.org <pgsql-general@postgresql.org>
Subject: Re: CannotAcquireResourceException in Junit
Date: Tue, 30 Jan 2018 22:52:57 +1100
Message-ID: <1517313177.3061.7.camel@gmail.com> (raw)
In-Reply-To: <CAFNULEed5wtzzzwJ4zB=1wopbfeZT+S+a9Hu64B6xhOhZN2cqA@mail.gmail.com>
References: <CAFNULEfBcXOaWAbxGX2hHKGjM7q55+G7ZJSTVXw9TgJ8bu_S1A@mail.gmail.com>
	<75636663-BC9A-4DFD-BA21-3DCF16852A82@gmail.com>
	<CAFNULEfLtBV+A8qOzuXWcEWdLih6LLFd1FbWCcCGAKfCqSkOiQ@mail.gmail.com>
	<A9339E2E-65B8-4ED8-93A8-9FD47DA2ED0E@gmail.com>
	<CAFNULEed5wtzzzwJ4zB=1wopbfeZT+S+a9Hu64B6xhOhZN2cqA@mail.gmail.com>



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




view thread (6+ messages)

Message-ID: <1517313177.3061.7.camel@gmail.com>
Permalink:  ../1517313177.3061.7.camel@gmail.com/
Also on:    postgresql.org/message-id/1517313177.3061.7.camel@gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: floriparob@gmail.com, abhra.kar@gmail.com, robjsargent@gmail.com
  Subject: Re: CannotAcquireResourceException in Junit
  In-Reply-To: <1517313177.3061.7.camel@gmail.com>
  References: <CAFNULEfBcXOaWAbxGX2hHKGjM7q55+G7ZJSTVXw9TgJ8bu_S1A@mail.gmail.com> <75636663-BC9A-4DFD-BA21-3DCF16852A82@gmail.com> <CAFNULEfLtBV+A8qOzuXWcEWdLih6LLFd1FbWCcCGAKfCqSkOiQ@mail.gmail.com> <A9339E2E-65B8-4ED8-93A8-9FD47DA2ED0E@gmail.com> <CAFNULEed5wtzzzwJ4zB=1wopbfeZT+S+a9Hu64B6xhOhZN2cqA@mail.gmail.com> <1517313177.3061.7.camel@gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox