Re: CannotAcquireResourceException in Junit

From: Abhra Kar <abhra(dot)kar(at)gmail(dot)com>
To: 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-25 04:32:43
Message-ID: CAFNULEfLtBV+A8qOzuXWcEWdLih6LLFd1FbWCcCGAKfCqSkOiQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Thanks Rob.

OS -- RHEL 6.7(Santiago)

Postgres Version -- 9.5

Location --*/usr/pgsql-9.5/bin/psql*

Can you please guide me , how to stop all those connection manually(From
psql prompt or linux shell or any .sh file with in postgres directory)

Regards,

Abhra

On Thu, Jan 25, 2018 at 9:36 AM, Rob Sargent <robjsargent(at)gmail(dot)com> wrote:

>
> > On Jan 24, 2018, at 9:57 AM, Abhra Kar <abhra(dot)kar(at)gmail(dot)com> wrote:
> >
> >
> > Hi,
> > I am getting the following error while running bunch of Junit
> test cases through “ant test” command----
> > Caused by: com.mchange.v2.resourcepool.CannotAcquireResourceException:
> A ResourcePool could not acquire a resource from its primary factory or
> source.
> > PFA full stack trace.
> >
> > After execution of 300 test cases I got this error. The setup() method
> code snippet is ---
> >
> > @Before
> > public void setUp() throws Exception {
> > entityManager = entityManagerFactory.
> createEntityManager();//javax.persistence.EntityManager
> > entityManager.getTransaction().begin();
> > }
> >
> > this method ran for all 300 test cases but didn’t get error .
> >
> > Another 900 test cases are remaining. I tried running single test cases
> from those test cases, getting same error for all.
> > What is root cause of this error.
> >
> > Thanks and Regards,
> > Abhra
> > <StackTrace.doc>
> Apparently Merlin is busy elsewhere. You need to name the OS, the
> postgres version, and the stack you’re using.
>
> But my guess is you’re not closing those connections and have hit a
> configuration limit for maximum connection.
>
>
>

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Rob Sargent 2018-01-25 04:58:05 Re: CannotAcquireResourceException in Junit
Previous Message Rob Sargent 2018-01-25 04:06:10 Re: CannotAcquireResourceException in Junit