pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: henk de wit <henk53602@hotmail.com>
To: pgsql-performance@postgresql.org
Subject: select on 22 GB table causes "An I/O error occured while sending to the backend." exception
Date: Tue, 26 Aug 2008 18:44:02 +0200
Message-ID: <BAY124-W57D3654AF1159CAF8EAC19F5660@phx.gbl> (raw)


Hi,

We're currently having a problem with queries on a medium sized table. This table is 22GB in size (via select pg_size_pretty(pg_relation_size('table'));). It has 7 indexes, which bring the total size of the table to 35 GB (measured with pg_total_relation_size).

On this table we're inserting records with a relatively low frequency of +- 6~10 per second. We're using PG 8.3.1 on a machine with two dual core 2.4Ghz XEON CPUs, 16 GB of memory and Debian Linux. The machine is completely devoted to PG, nothing else runs on the box.

Lately we're getting a lot of exceptions from the Java process that does these inserts: "An I/O error occured while sending to the backend." No other information is provided with this exception (besides the stack trace of course). The pattern is that for about a minute, almost every insert to this 22 GB table results in this exception. After this minute everything is suddenly fine and PG happily accepts all inserts again. We tried to nail the problem down, and it seems that every time this happens, a select query on this same table is in progress. This select query starts right before the insert problems begin and most often right after this select query finishes executing, inserts are fine again. Sometimes though inserts only fail in the middle of the execution of this select query. E.g. if the select query starts at 12:00 and ends at 12:03, inserts fail from 12:01 to 12:02.

We have spend a lot of hours in getting to the bottom of this, but our ideas for fixing this problem are more or less exhausted at the moment.

I wonder if anyone recognizes this problem and could give some pointers to stuff that we could investigate next. 

Thanks a lot in advance.

_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today it's FREE!
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/


view thread (65+ messages)  latest in thread

Message-ID: <BAY124-W57D3654AF1159CAF8EAC19F5660@phx.gbl>
Permalink:  ../BAY124-W57D3654AF1159CAF8EAC19F5660@phx.gbl/
Also on:    postgresql.org/message-id/BAY124-W57D3654AF1159CAF8EAC19F5660@phx.gbl

 · 

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: henk53602@hotmail.com
  Subject: Re: select on 22 GB table causes "An I/O error occured while sending to the backend." exception
  In-Reply-To: <BAY124-W57D3654AF1159CAF8EAC19F5660@phx.gbl>
  References: <BAY124-W57D3654AF1159CAF8EAC19F5660@phx.gbl>

* 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