pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Robert Treat <xzilla@users.sourceforge.net>
Cc: Tatsuo Ishii <t-ishii@sra.co.jp>
Cc: scott.marlowe@ihs.com
Cc: pgsql-hackers@postgresql.org
Subject: Re: Changing the default configuration
Date: Wed, 12 Feb 2003 11:48:57 -0500
Message-ID: <5061.1045068537@sss.pgh.pa.us> (raw)
In-Reply-To: <1045067779.12931.258.camel@camel>
References: <20030212.101008.41630074.t-ishii@sra.co.jp>
	<Pine.LNX.4.33.0302111815590.1977-100000@css120.ihs.com>
	<20030212.110000.97298009.t-ishii@sra.co.jp>
	<1045067779.12931.258.camel@camel>

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



view thread (12+ messages)  latest in thread

Message-ID: <5061.1045068537@sss.pgh.pa.us>
Permalink:  ../5061.1045068537@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/5061.1045068537@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-performance@postgresql.org
  Cc: tgl@sss.pgh.pa.us, xzilla@users.sourceforge.net, t-ishii@sra.co.jp, scott.marlowe@ihs.com, pgsql-hackers@postgresql.org
  Subject: Re: Changing the default configuration
  In-Reply-To: <5061.1045068537@sss.pgh.pa.us>
  References: <20030212.101008.41630074.t-ishii@sra.co.jp> <Pine.LNX.4.33.0302111815590.1977-100000@css120.ihs.com> <20030212.110000.97298009.t-ishii@sra.co.jp> <1045067779.12931.258.camel@camel> <5061.1045068537@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox