Received: from localhost (maia-3.hub.org [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id 697B99FA19A for ; Thu, 30 Nov 2006 11:30:39 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-new, port 10024) with ESMTP id 11340-03 for ; Thu, 30 Nov 2006 11:30:25 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id AC7B89FA18B for ; Thu, 30 Nov 2006 11:30:31 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.6/8.13.6) with ESMTP id kAUFURJh013455; Thu, 30 Nov 2006 10:30:27 -0500 (EST) To: Geoffrey cc: John Allgood , pgsql-admin@postgresql.org, Terry Lee Tucker , "J. D. Pearson" Subject: Re: Out of file-descriptors message In-reply-to: <456EF08C.3000302@3times25.net> References: <456DF2DE.3060002@turbocorp.com> <4727.1164835974@sss.pgh.pa.us> <456E03C9.6070204@the-allgoods.net> <20061129222523.GI7001@alvh.no-ip.org> <456EE6CE.2030106@3times25.net> <20061130142758.GI15105@alvh.no-ip.org> <456EEECC.1000701@3times25.net> <20061130145143.GJ15105@alvh.no-ip.org> <456EF08C.3000302@3times25.net> Comments: In-reply-to Geoffrey message dated "Thu, 30 Nov 2006 09:54:04 -0500" Date: Thu, 30 Nov 2006 10:30:27 -0500 Message-ID: <13454.1164900627@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200611/260 X-Sequence-Number: 23787 Geoffrey writes: > Alvaro Herrera wrote: >> Yes. Which is kinda weird, because Postgres actually tests the number >> when it starts, so that if you set the number too high, it will decrease >> it according to what the kernel allows. >> >> Maybe the test is newer than the version you are running -- what was it, >> again? >> > 7.4.13 Hmph ... 7.4.13 does have the same set_max_safe_fds() logic as HEAD. So this shouldn't be happening really, no matter what the relative values of max_files_per_process and ulimit -n are. Explanations I can think of: * ulimit -n decreased after process startup (is this even possible?) * something is leaking file descriptors that are outside fd.c's control, such that eventually there are more than NUM_RESERVED_FDS of 'em. Theory B seems a lot more plausible. It'd be interesting to look at "lsof" output for one of the backend processes that is emitting this message, to see if we can identify what's getting leaked. regards, tom lane