Re: To many connections Error

Поиск
Список
Период
Сортировка
От scott.marlowe
Тема Re: To many connections Error
Дата
Msg-id Pine.LNX.4.33.0212180856490.3136-100000@css120.ihs.com
обсуждение исходный текст
Ответ на To many connections Error  (David Siebert <david@eclipsecat.com>)
Ответы Re: To many connections Error  (Alvaro Herrera <alvherre@dcc.uchile.cl>)
Список pgsql-general
On Wed, 18 Dec 2002, David Siebert wrote:

> I am getting an error message that says that there are too many connections.
> There is maybe 20 people logged on and I have max connections set to 32.
> Any suggestions?

Let me guess, you're running PHP and using pg_pconnect?

Bad idea, unless you know exactly what you are doing.

I suggest one of two solutions.

1:  Discontinue use of pg_pconnect.  Performance gains from pg_pconnect
aren't that great on a lightly loaded system and the inherent problems
that pg_pconnect can produce are much worse than any small performance
gain you might see.

2:  If you really need pg_pconnect, then you have to configure your apache
web server and your postgresql database the right way.

assuming a single db and a single apache server, you need to edit the
apache server's httpd.conf file to change the MaxClients value to be LESS
than whatever you set the max children in postgresql to.  Postgresql
defaults to 32, while apache defaults to 150.  Also, leave some breathing
room for other access methods (ODBC, psql etc...)

Most setups will run fine with something like this:

postgresql.conf:
max_connections = 64

httpd.conf:
MaxClients 50


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: SELECT EXTRACT doesn't work with variables?
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Linux folders permission - postgresql