From: Kevin Grittner <Kevin.Grittner@wicourts.gov>
To: Suprabhat Mohapatra <suprabhatm@gmail.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: BUG #5995: connection pooling not working
Date: Thu, 28 Apr 2011 09:37:59 -0500
Message-ID: <4DB93577020000250003CFE6@gw.wicourts.gov> (raw)
In-Reply-To: <BANLkTikHLPpsktu+Urm-FLCcU-KRyLWKYw@mail.gmail.com>
References: <201104271155.p3RBtDwu092291@wwwmaster.postgresql.org>
<4DB7D775020000250003CF28@gw.wicourts.gov>
<BANLkTikHLPpsktu+Urm-FLCcU-KRyLWKYw@mail.gmail.com>
Please keep the list copied. I'm moving this to the pgsql-admin
list (with a blind copy to -bugs), since there is really no hint of
a PostgreSQL bug here, except possibly in terms of how we document
this issue.
Suprabhat Mohapatra <suprabhatm@gmail.com> wrote:
> Should I send you the sample code that we are using.
That's unlikely to help much.
You either need to really boost max_connections or (much better)
properly configure some connection pooler. There are many options
for the latter. I'm told that Tomcat comes with a good connection
pooler built in. If you're in an environment where the software
comes with a connection pooler, that is often the best way to go.
Otherwise, pgbouncer and pgpool both have their fans. I've looked
over the stand-alone JDBC pooler that Apache has, and it looked
pretty good, too.
The key is read the documentation carefully, and understand that the
pooler can accept 300 client connections to it (or whatever number
you need) and service those with a much smaller set of database
connections. If you're configuring the pooler to use as many
database connections as you have clients, you're missing the point.
> I am on a production system and we have reached a stage where we
> may lose the business if this is not done in this week.
You might want to contact one of the many organizations which
provide contract support for PostgreSQL. I'm pretty sure most or
all of them will have someone with experience configuring a good
connection pooler.
http://www.postgresql.org/support/professional_support
-Kevin
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-admin@postgresql.org
Cc: Kevin.Grittner@wicourts.gov, suprabhatm@gmail.com
Subject: Re: BUG #5995: connection pooling not working
In-Reply-To: <4DB93577020000250003CFE6@gw.wicourts.gov>
References: <201104271155.p3RBtDwu092291@wwwmaster.postgresql.org> <4DB7D775020000250003CF28@gw.wicourts.gov> <BANLkTikHLPpsktu+Urm-FLCcU-KRyLWKYw@mail.gmail.com> <4DB93577020000250003CFE6@gw.wicourts.gov>
* 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