From: Paul Thomas <paul@tmsl.demon.co.uk>
To: Matthew Hixson <hixson@poindextrose.org>
Cc: pgsql-performance @ postgresql . org <pgsql-performance@postgresql.org>
Subject: Re: raise or lower transaction timeout?
Date: Thu, 3 Jul 2003 09:47:44 +0100
Message-ID: <20030703094744.A6212@bacon> (raw)
In-Reply-To: <60DAC973-ACC8-11D7-9D40-000393669C1A@poindextrose.org>
References: <60DAC973-ACC8-11D7-9D40-000393669C1A@poindextrose.org>
On 02/07/2003 21:04 Matthew Hixson wrote:
> We currently have a public website that is serving customers, or at
> least trying to. This machine is underpowered but we are going to be
> upgrading soon. In the meantime we need to keep the current site alive.
> We are running a Java application server. It is receiving
> 'transaction timed out' SQLExceptions from the JDBC driver. I am
> wondering if it would be better to raise the transaction timeout or to
> lower it. On one hand it seems like raising it might improve things.
> It might let the transactions complete, even though it would make the
> user experience less enjoyable having to wait longer. On the other hand
> I could see raising the transaction timeout just cause there to be more
> transactions in process which would thereby degrade performance since
> the machine would have even more work to do. Would, in fact, lowering
> the transaction timeout at least cause the machine to fail fast and
> return either an error or the page in a more timely manner on a per-user
> level? I'd like to keep people visiting the site while at the same time
> relieving some stress from the machine.
> We have also done little to no performance tuning of Postgres'
> configuration. We do have indexes on all of the important columns and
> we have reindexed. Any pointers would be greatly appreciated.
As well as the tuning postgresql advice which others have given, there's
another thing you could try:
Assuming you're using connection pooling, try reducing the maximum number
of connections. This will take some of the stress off the database.
--
Paul Thomas
+------------------------------+---------------------------------------------+
| Thomas Micro Systems Limited | Software Solutions for the Smaller
Business |
| Computer Consultants |
http://www.thomas-micro-systems-ltd.co.uk |
+------------------------------+---------------------------------------------+
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: paul@tmsl.demon.co.uk, hixson@poindextrose.org
Subject: Re: raise or lower transaction timeout?
In-Reply-To: <20030703094744.A6212@bacon>
References: <60DAC973-ACC8-11D7-9D40-000393669C1A@poindextrose.org> <20030703094744.A6212@bacon>
* 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