Re: Too Many Open Files... NetBSD

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Too Many Open Files... NetBSD
Дата
Msg-id 19477.1008719631@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Too Many Open Files... NetBSD  ("Ian Harding" <ianh@tpchd.org>)
Список pgsql-general
"Ian Harding" <ianh@tpchd.org> writes:
> Argh.  I have finally come to the point where i have to pay attention to this nuts and bolts stuff.
> I get:  ERROR:  pltcl: couldn't create pipe: too many open files

My guess is that you are running into the fact that Postgres doesn't
allow a lot of headroom between the system's open-files-per-process
ulimit and the number of files it will open on its own account.  It
looks like the headroom is only 10 by default (see fd.c); and I think
stdin/stdout/stderr/client-socket etc are part of the 10.  So if you are
trying to execute something like system() that might open several more
files, you could easily hit the ulimit.

You will certainly want to increase the ulimit, but the trick remains
to keep Postgres from slurping it all for itself.  In 7.1 I think the
only way is to recompile with a larger RESERVE_FOR_LD value in fd.c.
In 7.2 there is a config variable that can be set to limit Postgres'
usage of file descriptors to something less than your ulimit value.

            regards, tom lane

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

Предыдущее
От: Doug McNaught
Дата:
Сообщение: Re: Way to use count() and LIMIT?
Следующее
От: "Mitch Vincent"
Дата:
Сообщение: Re: Way to use count() and LIMIT?