Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id 85236133655C for ; Thu, 18 Nov 2010 03:38:01 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 65488-09 for ; Thu, 18 Nov 2010 07:37:54 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from www.postnewspapers.com.au (www.postnewspapers.com.au [173.230.139.50]) by mail.postgresql.org (Postfix) with ESMTP id 653B51337B39 for ; Thu, 18 Nov 2010 03:37:54 -0400 (AST) Received: from localhost (localhost [127.0.0.1]) by www.postnewspapers.com.au (Postfix) with ESMTP id 68EA681E; Thu, 18 Nov 2010 02:37:53 -0500 (EST) X-Virus-Scanned: amavisd-new at postnewspapers.com.au.com Received: from www.postnewspapers.com.au ([127.0.0.1]) by localhost (www.postnewspapers.com.au [127.0.0.1]) (amavisd-new, port 10024) with LMTP id SUvzU0XkDi41; Thu, 18 Nov 2010 02:37:52 -0500 (EST) Received: from mail.postnewspapers.com.au (ppp171-128.static.internode.on.net [150.101.171.128]) by www.postnewspapers.com.au (Postfix) with ESMTP id 6C39C19; Thu, 18 Nov 2010 02:37:52 -0500 (EST) Received: from [10.0.0.53] (wallace.localnet [10.0.0.53]) by mail.postnewspapers.com.au (Postfix) with ESMTP id 67D45AE3B1; Thu, 18 Nov 2010 15:37:51 +0800 (WST) Message-ID: <4CE4D7CF.3010200@postnewspapers.com.au> Date: Thu, 18 Nov 2010 15:37:51 +0800 From: Craig Ringer User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.9) Gecko/20100423 Thunderbird/3.0.4 MIME-Version: 1.0 To: amos CC: pgsql-bugs@postgresql.org Subject: Re: BUG #5756: postgres eat up all memory(2GB memory) References: <201011180318.oAI3IvTE047316@wwwmaster.postgresql.org> In-Reply-To: <201011180318.oAI3IvTE047316@wwwmaster.postgresql.org> X-Enigmail-Version: 1.0.1 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.91 tagged_above=-5 required=5 tests=BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201011/126 X-Sequence-Number: 28706 "Amos" This is not a bug. Your PostgreSQL install is misconfigured - you have told it to use more memory than you have. Use a reasonable number of max_connections, maybe as few as 20 or 30, and set c3p0 (your connection pooler) to use one or two fewer than that. Your webapp's clients should share the connections, and you should get MUCH, MUCH better results that way, because your machine will spend less time thrashing and more time getting real work done. Feel free to ask for help on the postgresql-general mailing list if you want further assistance. http://www.postgresql.org/community/lists/ http://archives.postgresql.org/pgsql-general/ -- System & Network Administrator POST Newspapers