Re: Too many clients to Postgresql server

Поиск
Список
Период
Сортировка
От scott.marlowe
Тема Re: Too many clients to Postgresql server
Дата
Msg-id Pine.LNX.4.44.0207181112350.1298-100000@css120.ihs.com
обсуждение исходный текст
Ответ на Re: Too many clients to Postgresql server  (Thomas Beutin <tyrone@laokoon.IN-Berlin.DE>)
Ответы Re: Too many clients to Postgresql server  (Siva Kumar <siva@leatherlink.net>)
Список 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,
>



В списке pgsql-general по дате отправления:

Предыдущее
От: "Rick Eicher II"
Дата:
Сообщение: Database does not exist in the system catalog - postgresql 7.2.1-5
Следующее
От: Ralph Graulich
Дата:
Сообщение: Re: Too many clients to Postgresql server