Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 508009F942F for ; Thu, 9 Nov 2006 09:44:45 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 46840-02 for ; Thu, 9 Nov 2006 09:44:41 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from net2.micro-automation.com (net2.micro-automation.com [64.7.141.29]) by postgresql.org (Postfix) with SMTP id F3D669F9425 for ; Thu, 9 Nov 2006 09:44:40 -0400 (AST) Received: (qmail 24894 invoked from network); 9 Nov 2006 13:44:39 -0000 Received: from dcdsl.ebox.com (HELO ?192.168.1.2?) (davec@64.7.143.116) by net2.micro-automation.com with SMTP; 9 Nov 2006 13:44:39 -0000 In-Reply-To: <45532921.7030303@relevanttraffic.com> References: <45532921.7030303@relevanttraffic.com> Mime-Version: 1.0 (Apple Message framework v752.2) Content-Type: text/plain; charset=ISO-8859-1; delsp=yes; format=flowed Message-Id: <9BBDE237-0E8C-4303-AFB2-2DA39664DDFC@fastcrypt.com> Cc: pgsql-jdbc@postgresql.org Content-Transfer-Encoding: quoted-printable From: Dave Cramer Subject: Re: Need help with org.postgresql.util.PSQLException: An I/O error occured while sending to the backend. Date: Thu, 9 Nov 2006 08:44:34 -0500 To: =?ISO-8859-1?Q?H=E5kan_Jacobsson?= X-Mailer: Apple Mail (2.752.2) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200611/39 X-Sequence-Number: 16081 The problem is that the connection is being dropped, or lost, or =20 broken. Is there a firewall involved ? Dave On 9-Nov-06, at 8:12 AM, H=E5kan Jacobsson wrote: > Hi, > > I=B4ve written a small JDBC-application. > I=B4m quering a large table in a postgreSQL database (version 8.08 =20 > and I=B4m using the postgresql-8.1-407.jdbc3 driver). I need to =20 > update a lot of the rows in the table and I try to do this 'on-the-=20 > fly' - that is, I use one statement to select the rows and while =20 > looping over the ResultSet I use another one to update the row if =20 > needed. > > The updates are executing very slowly, which is due to the fact =20 > that the database server is slow. > I keep getting this exception: > > org.postgresql.util.PSQLException: An I/O error occured while =20 > sending to the backend. > at org.postgresql.core.v3.QueryExecutorImpl.execute=20 > (QueryExecutorImpl.java:214) > at org.postgresql.jdbc2.AbstractJdbc2Statement.execute=20 > (AbstractJdbc2Statement.java:452) > at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags=20 > (AbstractJdbc2Statement.java:354) > at org.postgresql.jdbc2.AbstractJdbc2Statement.execute=20 > (AbstractJdbc2Statement.java:347) > at =20 > se.puzzled.ip.InsertIPCountryToDatabase.updateCountryCodesInUclickUsin=20= > gVector(InsertIPCountryToDatabase.java:239) > at se.puzzled.updater.CountryDriver.main(CountryDriver.java:30) > Caused by: java.net.SocketException: Connection reset > at java.net.SocketInputStream.read(Unknown Source) > at java.io.BufferedInputStream.fill(Unknown Source) > at java.io.BufferedInputStream.read(Unknown Source) > at org.postgresql.core.PGStream.ReceiveChar(PGStream.java:256) > at org.postgresql.core.v3.QueryExecutorImpl.processResults=20 > (QueryExecutorImpl.java:1163) > at org.postgresql.core.v3.QueryExecutorImpl.execute=20 > (QueryExecutorImpl.java:188) > ... 5 more > > Some updates execute correctly, but then the application crashes =20 > with the exception. > > I=B4ve seen other posts concerning this exception, but what I=B4d like = =20 > is a way to prohibit the > exception within my Java code - haven=B4t found any such solution in =20= > the posts that I=B4ve read. > > Any help would be very much appreciated! > > > ---------------------------(end of =20 > broadcast)--------------------------- > TIP 3: Have you checked our extensive FAQ? > > http://www.postgresql.org/docs/faq >