Re: Changing the default configuration

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Changing the default configuration
Дата
Msg-id 5061.1045068537@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Changing the default configuration  (Robert Treat <xzilla@users.sourceforge.net>)
Список pgsql-hackers
Robert Treat <xzilla@users.sourceforge.net> writes:
> Had this happen at a previous employer, and it definitely is bad. I
> believe we had to do a reboot to clear it up. And we saw the problem a
> couple of times since the sys admin wasn't able to deduce what had
> happened the first time we got it. IIRC the problem hit somewhere around
> 150 connections, so we ran with 128 max. I think this is a safe number
> on most servers these days (running linux as least) though out of the
> box I might be more inclined to limit it to 64. If you do hit a file
> descriptor problem, *you are hosed*.

If you want to run lots of connections, it's a real good idea to set
max_files_per_process to positively ensure Postgres won't overflow
your kernel file table, ie, max_connections * max_files_per_process
should be less than the file table size.

Before about 7.2, we didn't have max_files_per_process, and would
naively believe whatever sysconf() told us was an okay number of files
to open.  Unfortunately, way too many kernels promise more than they
can deliver ...
        regards, tom lane


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

Предыдущее
От: Andrew Sullivan
Дата:
Сообщение: Re: Changing the default configuration (was Re:
Следующее
От: Teodor Sigaev
Дата:
Сообщение: Re: Q about InsertIndexResult