X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id A72793A4F08 for ; Sun, 9 Jan 2005 17:15:58 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 56861-07 for ; Sun, 9 Jan 2005 17:15:52 +0000 (GMT) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by svr1.postgresql.org (Postfix) with ESMTP id 1F53B3A5343 for ; Sun, 9 Jan 2005 17:15:51 +0000 (GMT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.1/8.13.1) with ESMTP id j09HFm8P027869; Sun, 9 Jan 2005 12:15:49 -0500 (EST) To: Bradley Kieser Cc: PgSQL ADMIN Subject: Re: Postgres kills machine In-reply-to: <41E1405A.1060603@kieser.net> References: <41E1405A.1060603@kieser.net> Comments: In-reply-to Bradley Kieser message dated "Sun, 09 Jan 2005 14:31:54 +0000" Date: Sun, 09 Jan 2005 12:15:48 -0500 Message-ID: <27868.1105290948@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.003 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200501/53 X-Sequence-Number: 15912 Bradley Kieser writes: > Periodically we have queries (can't log in to see which ones) that kill > our machine by consuming huge amounts of resource. The first thing you need to do is find out what they are so you can fix them. Turning on logging of all statements would be a worthwhile investment. > The errors in the syslog are all to do with VM, so I assume that we are > running out of RAM. There is 1.5GB of RAM in the box which should be > more than enough for the databases that we run. What have you got sort_mem and max_connections set to? > I know that I can set process limits in the limits.conf file, but can > anyone suggest sensible values to put in there to limit the max memory > to 200MB per pg process? Personally I'd put "ulimit -d 200000000" into the postmaster startup script. > I have read that limits.conf only works if PG is linked using PAM and > someone in a thread said that PG doesn't use PAM. Can someone please > advise me on this? PAM has nothing to do with per-process limits. regards, tom lane