From: | "scott(dot)marlowe" <scott(dot)marlowe(at)ihs(dot)com> |
---|---|
To: | Thomas Beutin <tyrone(at)laokoon(dot)in-berlin(dot)de> |
Cc: | Siva Kumar <siva(at)leatherlink(dot)net>, <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Too many clients to Postgresql server |
Date: | 2002-07-18 17:16:33 |
Message-ID: | Pine.LNX.4.44.0207181112350.1298-100000@css120.ihs.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Thu, 18 Jul 2002, Thomas Beutin wrote:
> On Thu, Jul 18, 2002 at 10:48:22AM -0400, Robert Treat wrote:
> > Since you don't have the ability to bump up the maximum number of
> > connections, your best bet is to switch to pg_connect. The implications
> > would be that each page load will require a connection to the server,
> > but unless you are doing multiple database *connections* per page, this
> > impact is usually insignificant.
> If You don't need the performance go to pg_connect, but You can reach the
> limit this way too. You can adjust the max pg_pconnect's in the php.ini.
This isn't true, the max_persistant connections in the php.ini sets the
max number of persistant connections per apache/php backend. I.e. setting
max persistant to 16 would limit each apache child to 16 persistant
connections. If apache has the default of 150 children set, that's 150*16
max persistant connections.
The best bet here if one HAS to use persistant connections is to limit the
apache server to some smaller number (max_psql_connections-4 or
somethning)
Scott Marlowe
> Greetings,
> -tb
>
> > On Thu, 2002-07-18 at 15:09, Siva Kumar wrote:
> > > We have a website using postgresql and php, hosted in a shared server. The
> > > settings for the maximum connections allowed is 32.
> > >
> > > I have used the persistent connection function pg_pconnect for all the
> > > database connections. For the past one week I have started getting the
> > > maximum number of clients reached message now and then. Today one of my
> > > customers also called up with the same problem.
> > >
> > > The question is, should I change the way of connecting to the server to
> > > pg_connect? What will be the implications? Otherwise, how can the persistent
> > > connections be closed down?
> > >
> > > Thanks and best regards,
>
From | Date | Subject | |
---|---|---|---|
Next Message | Ralph Graulich | 2002-07-18 17:34:23 | Re: Too many clients to Postgresql server |
Previous Message | Rick Eicher II | 2002-07-18 16:56:23 | Database does not exist in the system catalog - postgresql 7.2.1-5 |