Re: More on Too Many Open Files... NetBSD

Lists: pgsql-general
From: "Ian Harding" <ianh(at)tpchd(dot)org>
To: <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: <pgsql-general(at)postgresql(dot)org>
Subject: Re: More on Too Many Open Files... NetBSD
Date: 2001-12-18 22:44:19
Message-ID: sc1f56c0.021@mail.tpchd.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

The command from inside the pltcl function? It is wrapped in a loop that should run about 200 times and is

exec echo $msg | mail -s "New Timecard System" -c "ianh(at)tpchd(dot)org" $U(username)@tpchd.org

where msg is a little message.

I start postgresql with default values.

Ian A. Harding
Programmer/Analyst II
Tacoma-Pierce County Health Department
(253) 798-3549
mailto: iharding(at)tpchd(dot)org

>>> Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> 12/18/01 02:30PM >>>
> This looks like all is well? Anyway, I still get
>
> ERROR: pltcl: couldn't create pipe: too many open files
>
> Thanks, I hope this is the right place to post, I figure I am
> looking for someone who knows what PG needs and what NetBSD is
> offering it...

Ulimit controls the maximum number of open files per process while
sysctl controls the maximum number of open files system-wide. I would
look at sysctl. However, if the number of system open files is low, I
would think you would see problems in more places. Is it possible your
command-line is trying to open an infinite number of files? Can you
send us your command line?

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026


From: Matt Sauve-Frankel <baud(at)philosophiebleue(dot)com>
To: Ian Harding <ianh(at)tpchd(dot)org>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: More on Too Many Open Files... NetBSD
Date: 2001-12-20 00:05:19
Message-ID: 20011219190519.A31917@hiss.philosophiebleue.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

Hi,

I think you should read login.conf(5) on that netbsd box of yours.
http://www.tac.eu.org/cgi-bin/man-cgi?login.conf+5+NetBSD-1.5.1

It looks like you file limit is about right for a default login class
look at /etc/login.conf if it exists on your system..

--
Matt Sauve-Frankel Philosophie Bleue | http://philosophiebleue.com
Network Administrator | http://pblue.com
-- An idea is not responsible for the people who believe in it


From: Matt Sauve-Frankel <baud(at)philosophiebleue(dot)com>
To: Ian Harding <ianh(at)tpchd(dot)org>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: More on Too Many Open Files... NetBSD
Date: 2001-12-20 00:28:00
Message-ID: 20011219192800.B31917@hiss.philosophiebleue.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

Hi,

from /usr/local/share/doc/postgresql/README.OpenBSD
on my OpenBSD 2.9 box

-snip
The ulimit settings can also be a problem. The following can be
added for the postgresql user in the /etc/login.conf file:

postgresql:\
:maxproc-max=256:\
:maxproc-cur=256:\
:openfiles-cur=768:\
:datasize-max=256M:\
:datasize-cur=64M:\
:stacksize-cur=4M:

For more than about 250 connections, these numbers should be
increased. Please report any changes and experiences to the package
maintainers so that we can update this file for future versions.
-/snip

you can assign a user to a login class by entering into the 5th field of your
passwd file. (edit it with vipw) check passwd(5) to be sure

postgresql:*:1013:1013:postgresql:0:0:PostgreSQL:/var/postgresql:/sbin/nologin

--
Matt Sauve-Frankel Philosophie Bleue | http://philosophiebleue.com
Network Administrator | http://pblue.com
-- An idea is not responsible for the people who believe in it