pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Jan de Visser <jdevisser@digitalfairway.com>
To: pgsql-performance@postgresql.org
Subject: Hanging queries and I/O exceptions
Date: Mon, 6 Mar 2006 09:38:00 -0500
Message-ID: <200603060938.00751.jdevisser@digitalfairway.com> (raw)

Hello,

While doing performance tests on Windows Server 2003 we observed to following 
two problems.

Environment: J2EE application running in JBoss application server, against 
pgsql 8.1 database. Load is caused by a smallish number of (very) complex 
transactions, typically about 5-10 concurrently.

The first one, which bothers me the most, is that after about 6-8 hours the 
application stops processing. No errors are reported, neither by the JDBC 
driver nor by the server, but when I kill the application server, I see that 
all my connections hang in a SQL statements (which never seem to return):

2006-03-03 08:17:12 4504 6632560 LOG:  duration: 45087000.000 ms  statement: 
EXECUTE <unnamed>  [PREPARE:  SELECT objID FROM objects WHERE objID = $1 FOR 
UPDATE]

I think I can reliably reproduce this by loading the app, and waiting a couple 
of hours.



The second problem is less predictable:

JDBC exception:

An I/O error occured while sending to the backend.
org.postgresql.util.PSQLException: An I/O error occured while sending to the 
backend.
        at 
org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:214)
        at 
org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:430)
        at 
org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:346)
        at 
org.postgresql.jdbc2.AbstractJdbc2Statement.executeQuery(AbstractJdbc2Statement.java:250)


In my server log, I have:

2006-03-02 12:31:02 5692 6436342 LOG:  could not receive data from client: A 
non-blocking socket operation could not be completed immediately.

At the time my box is fairly heavy loaded, but still responsive. Server and 
JBoss appserver live on the same dual 2Ghz Opteron.

A quick Google told me that:

1. More people have seen this.
2. No solutions.
3. The server message appears to indicate an unhandled WSAEWOULDBLOCK winsock 
error on recv(), which MSDN said is to be expected and should be retried.

Is this a known bug?

jan 


-- 
--------------------------------------------------------------
Jan de Visser                     jdevisser@digitalfairway.com

                Baruk Khazad! Khazad ai-menu!
--------------------------------------------------------------



Message-ID: <200603060938.00751.jdevisser@digitalfairway.com>
Permalink:  ../200603060938.00751.jdevisser@digitalfairway.com/
Also on:    postgresql.org/message-id/200603060938.00751.jdevisser@digitalfairway.com

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: jdevisser@digitalfairway.com
  Subject: Re: Hanging queries and I/O exceptions
  In-Reply-To: <200603060938.00751.jdevisser@digitalfairway.com>

* 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