Skip site navigation (1) Skip section navigation (2)

Connection pool deadlock

From: Anil Kumar <techbreeze(at)yahoo(dot)com>
To: pgsql-jdbc(at)postgresql(dot)org
Subject: Connection pool deadlock
Date: 2003-02-28 05:25:08
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-jdbc
Hi All,

I'm facing a problem with connection pooling. I'm using the
with PG 7.2 on RH 7.3.

This is a Web application running on Tomcat. To render one of its
pages it
requires three concurrent connections to the database. It requests
connection after another and return them in the reverse order (the
obtained connection is returned first and so on). This creates a
if multiple requests are coming for this particular page. For
example if  
the pool size is 10 and if the application is getting 4
requests for this page I found that the connection allocation
happens in
the following way:

conn 1 -> request 1
conn 2 -> request 2
conn 3 -> request 3
conn 4 -> request 4
conn 5 -> request 1
conn 6 -> request 2
conn 10 -> request 2

Here no request (or thread) will get enough number of connections
complete the request and all requests will go to an indefinite wait
Of course this happens only when the connection requests reaches
the pool

I guess that some of you must have experienced this problem. What
is the
way out (other that re-coding the application to complete the
request with
single connection)?

best regards

Do you Yahoo!?
Yahoo! Tax Center - forms, calculators, tips, more


pgsql-jdbc by date

Next:From: Tom LaneDate: 2003-02-28 06:06:43
Subject: Re: Connection pool deadlock
Previous:From: Bill SchneiderDate: 2003-02-28 04:26:32
Subject: Re: SSL for JDBC

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group