pg.ddx.io pgsql-jdbc@postgresql.org mailing list archive
help / color / mirror / Atom feedPSQLException An I/O error occured while sending to the backend
3+ messages / 3 participants
[nested] [flat]
* PSQLException An I/O error occured while sending to the backend
@ 2006-08-23 05:12 surabhi.ahuja <surabhi.ahuja@iiitb.ac.in>
0 siblings, 0 replies; 3+ messages in thread
From: surabhi.ahuja @ 2006-08-23 05:12 UTC (permalink / raw)
To: pgsql-jdbc
hi all,
I am using Postgres 8.0.0
I am getting the following exception in my code, please help as to what may be going wrong.
thanks,
regards
Surabhi
org.postgresql.util.PSQLException: An I/O error occured while sending to the backend.
at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:201)
at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:388)
at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:313)
at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:305)
at com.ge.hc.nuevo.sessions.dbexpress.DBSession.dbxTransaction(DBSession.java:1496)
at com.ge.hc.nuevo.sessions.dbexpress.DBSession.installImage(DBSession.java:1254)
at com.ge.hc.nuevo.sessions.dbexpress.DBSession.installFiles(DBSession.java:737)
at com.ge.med.terra.tap.dm.DMSession.installFiles(DMSession.java:414)
at com.ge.hc.nuevo.services.jmservice.WorkerThread.arRestore(WorkerThread.java:666)
at com.ge.hc.nuevo.services.jmservice.WorkerThread.run(WorkerThread.java:979)
at java.lang.Thread.run(Thread.java:595)
Caused by: java.net.SocketException: Broken pipe
at java.net.SocketOutputStream.socketWrite0(Native Method)
at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)
at java.net.SocketOutputStream.write(SocketOutputStream.java:136)
at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:65)
at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:123)
at org.postgresql.core.PGStream.flush(PGStream.java:494)
at org.postgresql.core.v3.QueryExecutorImpl.sendSync(QueryExecutorImpl.java:631)
at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:174)
... 10 more
^ permalink raw reply [nested|flat] 3+ messages in thread
* PSQLException: An I/O error occured while sending to the backend
@ 2010-10-12 23:55 Juan Argandoña <jargandona@bluestarenergy.com>
0 siblings, 1 reply; 3+ messages in thread
From: Juan Argandoña @ 2010-10-12 23:55 UTC (permalink / raw)
To: anthony@webmediaworks.co.uk; +Cc: pgsql-jdbc
Hi Anthony.
I have the same error into http://archives.postgresql.org/pgsql-jdbc/2005-04/msg00036.php . I have two locations, one from I connected and other from the users have connections. I think that they have wireless connection.
I have a app with postgresql-8.2-506.jdbc3.jar.
Can you talk how fixed these error, please?
Thanks, very much.
Atte,
Juan Argandoña.
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: PSQLException: An I/O error occured while sending to the backend
@ 2010-10-15 16:44 Samuel Gendler <sgendler@ideasculptor.com>
parent: Juan Argandoña <jargandona@bluestarenergy.com>
0 siblings, 0 replies; 3+ messages in thread
From: Samuel Gendler @ 2010-10-15 16:44 UTC (permalink / raw)
To: Juan Argandoña <jargandona@bluestarenergy.com>; +Cc: anthony@webmediaworks.co.uk; pgsql-jdbc
2010/10/12 Juan Argandoña <jargandona@bluestarenergy.com>
> Hi Anthony.
> I have the same error into
> http://archives.postgresql.org/pgsql-jdbc/2005-04/msg00036.php . I have
> two locations, one from I connected and other from the users have
> connections. I think that they have wireless connection.
> I have a app with postgresql-8.2-506.jdbc3.jar.
>
> Can you talk how fixed these error, please?
>
>
If it is the firewall losing state about idle connections (and that seems a
reasonably good guess), then you could try using a connection pool within
the app and then configure it to test a connection before handing it back to
the app. You'll need to change your architecture such that your application
code calls close on a connection as soon as it is done with a transaction in
order to return the connection to the pool and then retrieve a fresh
connection whenever it is about to interact with the db. For example, the
commons DBCP BasicDataSource allows you to instruct it to test a connection
when a connection is returned to the pool, periodically while it resides in
the pool, and/or whenever a connection is retrieved from the pool. You can
specify the query that gets run to test the connection ('select 1'), etc.
You can either perform idle testing frequently enough that the firewall's
state table remains current, keeping the connections alive, or just allow
the testOnBorrow functionality to ensure that any dead connections will be
purged from the pool before they are handed to the application. If you've
already got a global connection pool, then you can configure the size of the
pool that is local to the application instance to be very small (or 1).
That's all assuming that the diagnosis provided in your linked email is
correct, of course.
You might also use a more up to date version of the jdbc driver. Enabling
tcp keepalive on the underlying tcp connection ought to be enough to keep
the connection up to date in the firewall's state table. Your referenced
email is quite old, so perhaps more recent versions of the driver do so.
See section 2.4 at the bottom of this page for an explanation of what I am
assuming is causing your problem:
http://tldp.org/HOWTO/TCP-Keepalive-HOWTO/overview.html
--sam
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2010-10-15 16:44 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2006-08-23 05:12 PSQLException An I/O error occured while sending to the backend surabhi.ahuja <surabhi.ahuja@iiitb.ac.in>
2010-10-12 23:55 PSQLException: An I/O error occured while sending to the backend Juan Argandoña <jargandona@bluestarenergy.com>
2010-10-15 16:44 ` Re: PSQLException: An I/O error occured while sending to the backend Samuel Gendler <sgendler@ideasculptor.com>
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