pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Need help with org.postgresql.util.PSQLException: An I/O error occured while sending to the backend.
3+ messages / 3 participants
[nested] [flat]

* Need help with org.postgresql.util.PSQLException: An I/O error occured while sending to the backend.
@ 2006-11-09 13:12 Håkan Jacobsson <hakan.jacobsson@relevanttraffic.com>
  2006-11-09 13:44 ` Re: Need help with org.postgresql.util.PSQLException: An I/O error occured while sending to the backend. Dave Cramer <pg@fastcrypt.com>
  0 siblings, 1 reply; 3+ messages in thread

From: Håkan Jacobsson @ 2006-11-09 13:12 UTC (permalink / raw)
  To: pgsql-jdbc

Hi,

I´ve written a small JDBC-application.
I´m quering a large table in a postgreSQL database (version 8.08 and I´m 
using the postgresql-8.1-407.jdbc3 driver). I need to update a lot of 
the rows in the table and I try to do this 'on-the-fly' - that is, I use 
one statement to select the rows and while looping over the ResultSet  I 
use another one to update the row if needed.

The updates are executing very slowly, which is due to the fact that the 
database server is slow.
I keep getting this exception:

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:452)
    at 
org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:354)
    at 
org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:347)
    at 
se.puzzled.ip.InsertIPCountryToDatabase.updateCountryCodesInUclickUsingVector(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(QueryExecutorImpl.java:1163)
    at 
org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:188)
    ... 5 more

Some updates execute correctly, but then the application crashes with 
the exception.

I´ve seen other posts concerning this exception, but what I´d like is a 
way to prohibit the
exception within my Java code - haven´t found any such solution in the 
posts that I´ve read.

Any help would be very much appreciated!




^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: Need help with org.postgresql.util.PSQLException: An I/O error occured while sending to the backend.
  2006-11-09 13:12 Need help with org.postgresql.util.PSQLException: An I/O error occured while sending to the backend. Håkan Jacobsson <hakan.jacobsson@relevanttraffic.com>
@ 2006-11-09 13:44 ` Dave Cramer <pg@fastcrypt.com>
  0 siblings, 0 replies; 3+ messages in thread

From: Dave Cramer @ 2006-11-09 13:44 UTC (permalink / raw)
  To: Håkan Jacobsson <hakan.jacobsson@relevanttraffic.com>; +Cc: pgsql-jdbc

The problem is that the connection is being dropped, or lost, or  
broken. Is there a firewall involved ?

Dave
On 9-Nov-06, at 8:12 AM, Håkan Jacobsson wrote:

> Hi,
>
> I´ve written a small JDBC-application.
> I´m quering a large table in a postgreSQL database (version 8.08  
> and I´m using the postgresql-8.1-407.jdbc3 driver). I need to  
> update a lot of the rows in the table and I try to do this 'on-the- 
> fly' - that is, I use one statement to select the rows and while  
> looping over the ResultSet  I use another one to update the row if  
> needed.
>
> The updates are executing very slowly, which is due to the fact  
> that the database server is slow.
> I keep getting this exception:
>
> 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:452)
>    at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags 
> (AbstractJdbc2Statement.java:354)
>    at org.postgresql.jdbc2.AbstractJdbc2Statement.execute 
> (AbstractJdbc2Statement.java:347)
>    at  
> se.puzzled.ip.InsertIPCountryToDatabase.updateCountryCodesInUclickUsin 
> 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 
> (QueryExecutorImpl.java:1163)
>    at org.postgresql.core.v3.QueryExecutorImpl.execute 
> (QueryExecutorImpl.java:188)
>    ... 5 more
>
> Some updates execute correctly, but then the application crashes  
> with the exception.
>
> I´ve seen other posts concerning this exception, but what I´d like  
> is a way to prohibit the
> exception within my Java code - haven´t found any such solution in  
> the posts that I´ve read.
>
> Any help would be very much appreciated!
>
>
> ---------------------------(end of  
> broadcast)---------------------------
> TIP 3: Have you checked our extensive FAQ?
>
>               http://www.postgresql.org/docs/faq
>




^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: Need help with org.postgresql.util.PSQLException: An I/O error occured while
@ 2006-11-15 08:32 Håkan Jacobsson <hakan.jacobsson99@bredband.net>
  0 siblings, 0 replies; 3+ messages in thread

From: Håkan Jacobsson @ 2006-11-15 08:32 UTC (permalink / raw)
  To: pgsql-jdbc

Dave,

Thanx for the fast reply!
No firewall (except for the Windows XP built-in firewall) is involved.

Dave, I tried to answer to your reply earlier, but apparently my mail
didn´t come through. Thats way I´m posting this message as a new thread 
(not sure how it will be presented in the mailing list).

How do I reply to RE:messages?

/Håkan 




^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2006-11-15 08:32 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2006-11-09 13:12 Need help with org.postgresql.util.PSQLException: An I/O error occured while sending to the backend. Håkan Jacobsson <hakan.jacobsson@relevanttraffic.com>
2006-11-09 13:44 ` Dave Cramer <pg@fastcrypt.com>
2006-11-15 08:32 Re: Need help with org.postgresql.util.PSQLException: An I/O error occured while Håkan Jacobsson <hakan.jacobsson99@bredband.net>

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