users@glassfish.java.net

Re: Error: An existing connection was forcibly closed by the remote host

From: Binod <Binod.Pg_at_Sun.COM>
Date: Mon, 10 Apr 2006 08:53:23 +0530

Jeanfrancois Arcand wrote:

>
>
> Jason Lee wrote:
>
>> We have an application that is dying on Glassfish, but only
>> sporadically. In case it matters, it's a JSF application talking to a
>> PostgreSQL backend via Hibernate (and Spring). It works well under
>> Tomcat (RI 1.1), but fails intermittently. Just this morning, I got the
>> stack trace below. I waited a few minutes and hit refresh (which
>> re-POST-ed the request) and the application worked. We're running on
>> the April 4 nightly on Windows XP Pro.
>>
>> Any thoughts? Thanks!
>
>
> To exception usualy means the client connection (postgresql driver)
> didn't receive all the bytes it was expecting because the connection
> was closes (by the PostgreSQL db). I suspect the problem is with the
> DB itself (have you look at their bug list?) if it happen in Tomcat &
> GlassFish. But to make sure, can you restart AS by adding the
> following jvm-options in domain.xml:

It appear that the connections are cleaned up or timed out by the DB.
Have you tried using connection validation
feature in GlassFish. Then, app might work in GlassFish, even if it fail
in Tomcat.

- Binod.