X-Original-To: pgsql-hackers@postgresql.org Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id DFB7C475B8A for ; Wed, 12 Feb 2003 11:48:53 -0500 (EST) Received: from sss.pgh.pa.us (unknown [192.204.191.242]) by postgresql.org (Postfix) with ESMTP id 3013D475AFA for ; Wed, 12 Feb 2003 11:48:53 -0500 (EST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.6/8.12.6) with ESMTP id h1CGmw5u005062; Wed, 12 Feb 2003 11:48:58 -0500 (EST) To: Robert Treat Cc: Tatsuo Ishii , scott.marlowe@ihs.com, pgsql-hackers@postgresql.org Subject: Re: Changing the default configuration In-reply-to: <1045067779.12931.258.camel@camel> References: <20030212.101008.41630074.t-ishii@sra.co.jp> <20030212.110000.97298009.t-ishii@sra.co.jp> <1045067779.12931.258.camel@camel> Comments: In-reply-to Robert Treat message dated "12 Feb 2003 11:36:19 -0500" Date: Wed, 12 Feb 2003 11:48:57 -0500 Message-ID: <5061.1045068537@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200302/499 X-Sequence-Number: 35441 Robert Treat 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