X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 3440AD1E284 for ; Wed, 12 May 2004 15:39:34 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 37805-01 for ; Wed, 12 May 2004 15:39:13 -0300 (ADT) Received: from mammoth.utopiasystems.net (meridian1.utopiasystems.net [66.150.45.40]) by svr1.postgresql.org (Postfix) with ESMTP id 631DED1E276 for ; Wed, 12 May 2004 15:39:11 -0300 (ADT) Received: from [192.168.100.129] ([63.207.194.126]) by mammoth.utopiasystems.net with Microsoft SMTPSVC(6.0.3790.0); Wed, 12 May 2004 14:38:01 -0400 User-Agent: Microsoft-Entourage/10.1.4.030702.0 Date: Wed, 12 May 2004 11:39:08 -0700 Subject: RAM usage per connection From: Steve Lane To: Message-ID: In-Reply-To: <20040510122217.D1DF958005D0@mwinf0401.wanadoo.fr> Mime-version: 1.0 Content-type: text/plain; charset="US-ASCII" Content-transfer-encoding: 7bit X-OriginalArrivalTime: 12 May 2004 18:38:01.0937 (UTC) FILETIME=[416C4410:01C43850] X-Virus-Scanned: by amavisd-new at postgresql.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200405/113 X-Sequence-Number: 13429 Hello all: I have a customer with an application in production (postgres + php + apache) where we began seeing a number of scary messages in the logs. (It's postgres 7.2.1, by the way). Generally the messages seem to point to resource starvation of some kind: FATAL 1: out of free buffers: time to abort ! And Sorry, too many clients already Also some messages indicating shared memory had been corrupted. I shut down and ran ipcclean and those messages are gone. I also boosted shared-buffers considerably and the "out of free buffers" message is also gone. BUT, the "sorry too many clients" message persists. The app has a spike-y usage pattern, i.e. A large number of students sits down at once and takes a survey in accordance with verabl instructions from the front of the classroom, so many of them are hitting the proverbial Submit button at once. I tried increasing max_clients, but got a message to the effect that SHMMIN was set incorrectly on my machine ... Let me get to my actual question (none of the above contains the question yet :->). Is there any guideline as to how much free RAM I need per client connection? I think I understand that things like sort_mem play into this -- that's set low and should remain so. But for Apache, for example, I think of 10 meg per connection. Any similar rule of thumb for postgres? I'll follow up as I inspect the logs, but I haven't thoroughly sifted them. So for my now my question is the one about RAM per connection. Any thoughts'd be much appreciated. -- sgl ======================================================= Steve Lane Vice President The Moyer Group 14 North Peoria St Suite 2H Chicago, IL 60607 Voice: (312) 433-2421 Email: slane@moyergroup.com Fax: (312) 850-3930 Web: http://www.moyergroup.com =======================================================