I'm experiencing a strange problem with the PostgreSQL JDBC driver on a
project I'm working on. Our setup is like this:
Apache Tomcat 5.5.17
We exclusively use the JDBC connections through Hibernate, which again
uses the C3P0 connection pool. Normally this setup works fine, but on
Win2K SP4, we are experiencing strange problems.
Randomly we get "java.net.SocketException: Connection reset". The error
occurs in different parts of the application, but more frequently some
places, and mysteriously much more frequent when using Internet Explorer
6 (IE) on the same host as the web and DB server (localhost) than when
using Firefox (FF). In fact to begin with we thought the error only
occurred with IE, but we've also seen it happen with FF and Opera
sometimes, but very rarely.
There is nothing in our architecture that links the browser to the JDBC
connection, so I cannot explain why the error almost exclusively occurs
with IE. Even more strangely in not able to reproduce the error when
debugging the JDBC driver (by setting loglevel=2 on the connection URL),
nor when running against a DB on a different server, or when running
Tomcat on a different server using the DB on the affected server. The
application also supports MySQL and we're not seeing this error there.
We've also not seen the error Windows XP.
Here is the stack trace from the "Connection reset" exception. For the
sake of readability I removed some parts which I think is of no
01-09-2006 07:50:02,071 WARN JDBCExceptionReporter: SQL Error: 0,
01-09-2006 07:50:02,071 ERROR JDBCExceptionReporter: An I/O error
occured while sending to the backend.
01-09-2006 07:50:02,081 ERROR [jsp]: Servlet.service() for servlet jsp
org.hibernate.exception.JDBCConnectionException: could not initialize a
Caused by: org.postgresql.util.PSQLException: An I/O error occured while
sending to the backend.
... 89 more
Caused by: java.net.SocketException: Connection reset
... 98 more
Does this make sense to any of you? It doesn't to me, but the error is
consistent, and I've tested this a lot. Any help or suggestions are much
Senior Software Engineer
pgsql-jdbc by date
|Next:||From: Guillaume Cottenceau||Date: 2006-09-01 14:39:49|
|Subject: Re: Strange JDBC problem|
|Previous:||From: Bruce Momjian||Date: 2006-08-31 18:48:19|
|Subject: Re: [HACKERS] [PATCHES] log_statement output for protocol|