Re: ERROR: canceling statement due to statement timeout

From: Craig Ringer <craig(at)postnewspapers(dot)com(dot)au>
To: Tim <tavspam(at)gmail(dot)com>
Cc: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: ERROR: canceling statement due to statement timeout
Date: 2010-07-03 01:41:19
Message-ID: 4C2E953F.8010007@postnewspapers.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 03/07/10 00:22, Tim wrote:
> Hi,
>
> I've had a website up for a couple of months and it's starting to get
> these db timeouts as traffic has increased to say 1k pageviews a day.

Take note of which queries are timing out. You might need to enable some
more logging in your app or the db to find out.

Use EXPLAIN ANALYZE to collect information about the performance of
those queries. You can post that here, along with some information about
your schema.

Monitor pg_catalog.pg_stat_activity for query runtimes and general load.

Turn off the statement_timeout, or at least increase it considerably.

--
Craig Ringer

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Craig Ringer 2010-07-03 01:51:49 Re: New DB-design - help and documentation pointers appreciated
Previous Message Craig Ringer 2010-07-03 01:35:56 Re: C-Functions using SPI - Missing Magic Block