X-Original-To: pgsql-performance@postgresql.org Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id B1690474E4F for ; Thu, 27 Feb 2003 08:16:40 -0500 (EST) Received: from postgresql.org ([64.49.215.8]) by localhost (postgresql.org [64.49.215.8:10024]) (amavisd-new) with SMTP id 03587-09 for ; Thu, 27 Feb 2003 08:16:30 -0500 (EST) Received: from wolff.to (wolff.to [66.93.249.74]) by postgresql.org (Postfix) with SMTP id E82CC474E42 for ; Thu, 27 Feb 2003 08:16:29 -0500 (EST) Received: (qmail 28999 invoked by uid 500); 27 Feb 2003 13:30:11 -0000 Date: Thu, 27 Feb 2003 07:30:11 -0600 From: Bruno Wolff III To: Catalin Cc: pgsql-performance@postgresql.org Subject: Re: Daily crash Message-ID: <20030227133011.GA28616@wolff.to> Mail-Followup-To: Catalin , pgsql-performance@postgresql.org References: <3E5E50B8.10803.E998B57@localhost> <00da01c2de5f$04154f40$0201a8c0@catalin> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <00da01c2de5f$04154f40$0201a8c0@catalin> User-Agent: Mutt/1.3.25i X-Virus-Scanned: by amavisd-new X-Archive-Number: 200302/229 X-Sequence-Number: 1285 On Thu, Feb 27, 2003 at 14:51:59 +0200, Catalin wrote: > i'm afraid i don't have any logs. > i have the default redhat instalation of postgres 7.0.2 which comes with no > logging enabled. You should upgrade to 7.2.4 or 7.3.2. (7.3 has schemas and that may make upgrading harder which is why you might consider just going to 7.2.4.) > i will try to enable logging and post the logs to the list ! > > anyway in PHP when trying to connect to the crashed SQL server i get the > error message: > Too many connections... You are going to want the number of allowed connections to match the number of simultaneous requests possible from the web server. Typically this is the maximum number of allowed apache processes which defaults to something like 150. The default maximum number of connections to postgres is about 32. You will also want to raise the number of shared buffers to about 1000 (assuming you have at least a couple hundred of megabytes of memory), not just to 2 times the new maximum number of connections. This may require to change the maximum amount of shared memory allowed by your operating system. Also take a look at increasing sort mem as well. You don't want this too high because each sort gets this much memory and in your situation it may be that you could have a lot of sorts runing at the same time (dpending on the types of queries being done).