Problem with connection to PostgreSQL 8 database

I'm a little new to PostgreSQL 8 and Resin. I get this exception after having not used the app for some time (8 hours it takes from what I've read):

com.mysql.jdbc.CommunicationsException: Communications link failure

due to underlying exception: ** BEGIN NESTED EXCEPTION ** java.io.

EOFException STACKTRACE: java.io.EOFException at

com.mysql.jdbc.MysqlIO.readFully(MysqlIO.java:1905) at

com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:2351) at

com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2862) at

com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1571) at

com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1666) at

com.mysql.jdbc.Connection.execSQL(Connection.java:2988) at

com.mysql.jdbc.Connection.execSQL(Connection.java:2917) at

com.mysql.jdbc.Statement.executeQuery(Statement.java:824)

at Brokers.ClientBroker.getClientString(ClientBroker.java:16)

at SignIn.doPost(SignIn.java:43) at

javax.servlet.http.HttpServlet.service(HttpServlet.java:165) at

javax.servlet.http.HttpServlet.service(HttpServlet.java:103) at

com.caucho.server.http.FilterChainServlet.doFilter(FilterChainServlet.java:96)

at com.caucho.server.http.Invocation.service(Invocation.java:315)

at com.caucho.server.http.CacheInvocation.service(CacheInvocation.java:135) at com.caucho.server.http.RunnerRequest.handleRequest(RunnerRequest.java:346) at com.caucho.server.http.RunnerRequest.handleConnection(RunnerRequest.java:274) at com.caucho.server.TcpConnection.run(TcpConnection.java:139) at java.lang.Thread.run(Thread.java:534) ** END NESTED EXCEPTION ** Last packet sent to the server was 1 ms ago.

After I make any kind of upload to my web host (it reloads I believe) then I can make a connection just fine. I open the connection in the init() of my login servlet and keep the connection open for the rest of session. Does anyone know anything more about this particular issue? The problem occurs on the web host so making any changes to the server.xml will mostlikely not be possible.

Thanks in advance.

[2140 byte] By [uberallesa] at [2007-11-26 15:53:48]
# 1
Exception seems to be related to MySQL and not Postgres.You can set "autoreconnect=true" property for MySQL to avoid this problem
Jagadish.Prasatha at 2007-7-8 22:14:19 > top of Java-index,Application & Integration Servers,Application Servers...