Re: High CPU with 7.4.1 after running for about 2 weeks - Mailing list pgsql-performance

From Mike Bridge
Subject Re: High CPU with 7.4.1 after running for about 2 weeks
Date
Msg-id ahi7509sakjto0b0nncmrl486ulot26vfh@4ax.com
Whole thread Raw
In response to High CPU with 7.4.1 after running for about 2 weeks  (Mike Bridge <mike@bridgecanada.com>)
Responses Re: High CPU with 7.4.1 after running for about 2 weeks
List pgsql-performance
>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




pgsql-performance by date:

Previous
From: Matt Davies
Date:
Subject: Re: Scaling further up
Next
From: Tom Lane
Date:
Subject: Re: Large CASE-statement is pretty slow?