james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Richard O. Hammer" <ROHam...@EarthLink.net>
Subject keeping a JDBC connection active
Date Wed, 14 Apr 2004 17:39:56 GMT
In my mailserver (a cousin of James) I use one java.sql.Connection 
throughout the life of the server.  I call 
java.sql.DriverManager.getConnection() once at server startup.  I've 
never suspected there was anything wrong with this, but I guess there 
might be.

If this is of interest to anybody, several times I have gotten 
"java.net.SocketException Connection reset by peer", indicating a dead 
connection to the database and requiring me to restart the server. 
This happens several hours after server startup, when I am running the 
mailserver in a Windows 2000 desktop and the database (PostgreSQL) in 
a RH7.3 Linux box on the LAN.  I have found that I can work around 
this by running both mailserver and database on the same Linux box; 
then the Connection seems to last forever.

Rich Hammer

Noel J. Bergman wrote:
>>Do you have any reason to believe that there are legitimate
>>reasons for a JDBC connection to be active for several
>>minutes, much less an hour?
> 
> I ran grep against the logs in my production environment.  There have been
> 32 timeouts since August 2002.  Getting them tends to indicate a need to
> repair tables, at least in our environment.


---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


Mime
View raw message