From: Tom Lane <tgl@sss.pgh.pa.us>
To: Bradley Kieser <brad@kieser.net>
Cc: PgSQL ADMIN <pgsql-admin@postgresql.org>
Subject: Re: Postgres kills machine
Date: Sun, 09 Jan 2005 12:15:48 -0500
Message-ID: <27868.1105290948@sss.pgh.pa.us> (raw)
In-Reply-To: <41E1405A.1060603@kieser.net>
References: <41E1405A.1060603@kieser.net>
Bradley Kieser <brad@kieser.net> 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
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-admin@postgresql.org
Cc: tgl@sss.pgh.pa.us, brad@kieser.net
Subject: Re: Postgres kills machine
In-Reply-To: <27868.1105290948@sss.pgh.pa.us>
References: <41E1405A.1060603@kieser.net> <27868.1105290948@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