Re: 100 simultaneous connections, critical limit?

Поиск
Список
Период
Сортировка
От Christopher Browne
Тема Re: 100 simultaneous connections, critical limit?
Дата
Msg-id m3fzeilkyg.fsf@wolfe.cbbrowne.com
обсуждение исходный текст
Ответ на 100 simultaneous connections, critical limit?  (Jón Ragnarsson <jonr@physicallink.com>)
Ответы Re: 100 simultaneous connections, critical limit?  (Jón Ragnarsson <jonr@physicallink.com>)
Re: 100 simultaneous connections, critical limit?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-performance
Clinging to sanity, jonr@physicallink.com (Jón Ragnarsson) mumbled into her beard:
> I am writing a website that will probably have some traffic.
> Right now I wrap every .php page in pg_connect() and pg_close().
> Then I read somewhere that Postgres only supports 100 simultaneous
> connections (default). Is that a limitation? Should I use some other
> method when writing code for high-traffic website?

I thought the out-of-the-box default was 32.

If you honestly need a LOT of connections, you can configure the
database to support more.  I "upped the limit" on one system to have
512 the other week; certainly supportable, if you have the RAM for it.

It is, however, quite likely that the connect()/close() cuts down on
the efficiency of your application.  If PHP supports some form of
"connection pooling," you should consider using that, as it will cut
down _dramatically_ on the amount of work done establishing/closing
connections, and should let your apps use somewhat fewer connections
more effectively.
--
(format nil "~S@~S" "cbbrowne" "acm.org")
http://cbbrowne.com/info/linux.html
"It has been said  that man is a rational animal.  All  my life I have
been searching for evidence which could support this."
-- Bertrand Russell

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

Предыдущее
От: Shridhar Daithankar
Дата:
Сообщение: Re: 100 simultaneous connections, critical limit?
Следующее
От: Jón Ragnarsson
Дата:
Сообщение: Re: 100 simultaneous connections, critical limit?