tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Cato, Christopher" <cc...@rational.com>
Subject RE: Broken pipe error
Date Thu, 22 Feb 2001 14:28:45 GMT
> And I have also the same trouble, but it's a JDBC Exception 
> which is thrown
> by a JSP page connecting to oracle thru a RMI server.. 
> basically, I'v setup
> an RMI Interface which offers SQL access to a SGBD, and in the
> implementation of this Interface I use JDBC stuff to execute the SQL
> statement... 
> 
> A broken pipe exception is then thrown if the user stays 
> inactif a long
> time... To my mind, its either the socket in the thin oracle 
> drive which is
> duty...
> 
> But I'm still searching for a solution...
> 
> _______________________________________________________
> Laurent LAUBIN              S2M
> Ingénieur système           2, rue des champs - BP 2282
> Tél : +33 232 64 33 76      27950 St-Marcel - France
> Fax : +33 232 21 25 99      http://www.s2m.fr/
> _______________________________________________________
>   

Did you try to set the reconnect = true somewhere? I don't know if it's
mm.mysql (the MySQL jdbc driver) specific. If it's not - set it. The
connection (or rather the timeout of the connection) is managed by the DB,
not the driver. The driver connects on init() and disconnects on destroy(). 

So, if the DB is set to close the connection after say 900 seconds and your
servlets are not used for 1000 seconds, the pipe (connection) would be
broken. At least that's the behaviour I've seen. If available, take some
time to go through the sources for your JDBC driver and see what's actually
going on.

/Christopher Cato





> 
> -----Message d'origine-----
> De : Cato, Christopher [mailto:ccato@rational.com]
> Envoyé : jeudi 22 février 2001 14:37
> À : 'tomcat-user@jakarta.apache.org'
> Objet : RE: Broken pipe error
> 
> 
> > Hi:
> > I get "broken pipe error" when trying to re-execute a servlet after
> > several hours of innactivity. Then I must re-start Tomcat to get all
> > running again.
> > The servlet is connected to a database using oracle thin 
> driver, these
> > connection is still active.
> > So my question is:
> > It is possible that the socket between Tomcat and database is being
> > closed by Tomcat?
> > If the answer is yes, how can I configure these timeout.
> > 
> > Regards.
> > Xavier Escandell.
> 
> I used to have the exact same problem with my TomCat / MySQL 
> application
> until i added autoreconnect=true to the db connection 
> initiator method in my
> general db tool class. Since then, the problem ceased.
> 
> /Christopher Cato
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, email: tomcat-user-help@jakarta.apache.org
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, email: tomcat-user-help@jakarta.apache.org
> 

Mime
View raw message