pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Mike Bridge <mike@bridgecanada.com>
To: pgsql-performance@postgresql.org
Subject: Re: High CPU with 7.4.1 after running for about 2 weeks
Date: Sun, 14 Mar 2004 03:10:18 GMT
Message-ID: <ahi7509sakjto0b0nncmrl486ulot26vfh@4ax.com> (raw)
References: <l63t40lg2jr37uqgevign3fq4stukpihi0@4ax.com>
	<7304.1079219828@sss.pgh.pa.us>

>Since the postmaster is a single unthreaded process, it's quite
>impossible for it to take up 100% of two CPUs.  Could you be more
>precise about which processes were eating CPU, and what they were
>doing according to the available state data?  (ps auxww and
>pg_stat_activity can be helpful tools.)
>
>			regards, tom lane

I shut down all our clients (all java except one in perl), and
pg_stat_activity showed that there was still one query active.  That's
a good table to know about!  Anyway, it didn't end until I sent it a
TERM signal.  I assume this means there's a runaway query somewhere,
which I'll have to hunt down.

But if the client dies, doesn't postgresql normally terminate the
query that that client initiated?  Or do I need to set
statement_timeout?

(As for the 100% CPU, I was confused by the fact that I was getting
two lines in "top" (on Linux) with 99% utilization---I assume with two
runaway queries.)

Thanks for your help!

-Mike






view thread (4+ messages)  latest in thread

Message-ID: <ahi7509sakjto0b0nncmrl486ulot26vfh@4ax.com>
Permalink:  ../ahi7509sakjto0b0nncmrl486ulot26vfh@4ax.com/
Also on:    postgresql.org/message-id/ahi7509sakjto0b0nncmrl486ulot26vfh@4ax.com

 · 

reply

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-performance@postgresql.org
  Cc: mike@bridgecanada.com
  Subject: Re: High CPU with 7.4.1 after running for about 2 weeks
  In-Reply-To: <ahi7509sakjto0b0nncmrl486ulot26vfh@4ax.com>
  References: <l63t40lg2jr37uqgevign3fq4stukpihi0@4ax.com> <7304.1079219828@sss.pgh.pa.us> <ahi7509sakjto0b0nncmrl486ulot26vfh@4ax.com>

* 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