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