You are viewing a plain text version of this content. The canonical link for it is here.
Posted to torque-dev@db.apache.org by Quinton McCombs <qm...@nequalsone.com> on 2003/01/09 18:38:44 UTC
RE: Getting bad connections from Torque
I have seen that behavior as well. When the database is restarted, the
app must be restarted as well. I think that Torque should be able to
recover from it without a restart though.....
> -----Original Message-----
> From: Phee, Martin J (Jump Tech) [mailto:Marty.Phee@bp.com]
> Sent: Thursday, January 09, 2003 10:09 AM
> To: 'Turbine Users List'
> Subject: RE: Getting bad connections from Torque
>
>
> I think the db did go down last weekend. Actually the server
> did a shutdown because of a bad processor, but there was
> another time where nothing went wrong with the db and I got a
> bad connection. Even if the server were to go down I thought
> that Torque should check the status by executing the validationQuery.
>
> -----Original Message-----
> From: Quinton McCombs [mailto:qmccombs@nequalsone.com]
> Sent: Thursday, January 09, 2003 9:47 AM
> To: Turbine Users List
> Subject: RE: Getting bad connections from Torque
>
>
> Did the database get restarted or did a DBA kill some active
> sessions on the database? This is about the only way to get
> that message from the Oracle JDBC driver. The session was
> closed at the server.
>
> I can't really speak about what the validation query is used
> for because I have not looked at the code. However, I
> thought it was to periodically test the connections in the
> pool to make sure that they were still valid.
>
> Could you create a defect issue @
> http://scarab.werken.com/issue about this problem? That way
> we can make sure that it will be addressed.
>
> > -----Original Message-----
> > From: Phee, Martin J (Jump Tech) [mailto:Marty.Phee@bp.com]
> > Sent: Thursday, January 09, 2003 9:07 AM
> > To: Turbine Users List
> > Subject: Getting bad connections from Torque
> >
> >
> > I'm having a problem with torque and oracle. Maybe it's my
> > misunderstanding. Every once in a while I'm getting the
> > following error in my turbine.log:
> >
> > [Tue Jan 07 08:52:13 CST 2003] -- ERROR -- Turbine.handleException:
> > ORA-02068: following severe error from xxxxxxx
> > ORA-03113: end-of-file on communication channel
> >
> > When torque returns a db connection isn't it supposed to
> > check to see if it's still a good connection? Below is my
> > torque setup. Only seems to happen after a weekend when no
> > one has been using it for a while. What's the purpose of the
> > validationQuery? I'm currently using 3.0-rc1. I'm about to
> > upgrade to the release version once I'm done with
> regression testing.
> >
> > torque.dsfactory.smrt_prod.factory=org.apache.torque.dsfactory
> > .Jdbc2PoolData
> > SourceFactory torque.dsfactory.smrt_prod.pool.defaultMaxActive=10
> > torque.dsfactory.smrt_prod.pool.testOnBorrow=true
> > torque.dsfactory.smrt_prod.pool.validationQuery=SELECT 1 from
> > dual torque.dsfactory.smrt_prod.connection.driver =
> > oracle.jdbc.driver.OracleDriver
> > torque.dsfactory.smrt_prod.connection.url =
> > jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS=(HOST=xxxxxx)(PROTOCOL
> > =tcp)(PORT=152
> > 1))(CONNECT_DATA=(SID=xxxxx)))
> > torque.dsfactory.smrt_prod.connection.user =
> > torque.dsfactory.smrt_prod.connection.password =
> >
> > --
> > To unsubscribe, e-mail:
> > <mailto:turbine-torque-user-> unsubscribe@jakarta.apache.org>
> >
> > For additional commands,
> > e-mail: <ma...@jakarta.apache.org>
> >
> > --
> > To unsubscribe, e-mail:
> > <mailto:turbine-user-> unsubscribe@jakarta.apache.org>
> > For
> > additional commands,
> > e-mail: <ma...@jakarta.apache.org>
> >
> >
>
> --
> To unsubscribe, e-mail:
> <mailto:turbine-user-> unsubscribe@jakarta.apache.org>
> For
> additional commands,
> e-mail: <ma...@jakarta.apache.org>
>
> --
> To unsubscribe, e-mail:
> <mailto:turbine-user-> unsubscribe@jakarta.apache.org>
> For
> additional commands,
> e-mail: <ma...@jakarta.apache.org>
>
>
Re: Getting bad connections from Torque
Posted by "Henning P. Schmiedehausen" <hp...@intermeta.de>.
"Quinton McCombs" <qm...@nequalsone.com> writes:
>I have seen that behavior as well. When the database is restarted, the
>app must be restarted as well. I think that Torque should be able to
>recover from it without a restart though.....
Well, at least the torque internal pool (don't know about the Jdbc2 one)
has an isValid() method but it actually says
--- cut ---
// all this code is commented out because
// connection.getConnection() is called when the connection
// is returned to the pool and it will open a new logical Connection
// which does not get closed, then when it is called again
// when a connection is requested it likely fails because a
// new Connection has been requested and the old one is still
// open. need to either do it right or skip it. null check
// was not working either.
--- cut ---
which sucks. :-) You're right, Torque should check at pool checkout
time (not at check in time, don't know what the author smoked when he
wrote this)
This is a bug. I might look into this later this week.
Regards
Henning
>> -----Original Message-----
>> From: Phee, Martin J (Jump Tech) [mailto:Marty.Phee@bp.com]
>> Sent: Thursday, January 09, 2003 10:09 AM
>> To: 'Turbine Users List'
>> Subject: RE: Getting bad connections from Torque
>>
>>
>> I think the db did go down last weekend. Actually the server
>> did a shutdown because of a bad processor, but there was
>> another time where nothing went wrong with the db and I got a
>> bad connection. Even if the server were to go down I thought
>> that Torque should check the status by executing the validationQuery.
>>
>> -----Original Message-----
>> From: Quinton McCombs [mailto:qmccombs@nequalsone.com]
>> Sent: Thursday, January 09, 2003 9:47 AM
>> To: Turbine Users List
>> Subject: RE: Getting bad connections from Torque
>>
>>
>> Did the database get restarted or did a DBA kill some active
>> sessions on the database? This is about the only way to get
>> that message from the Oracle JDBC driver. The session was
>> closed at the server.
>>
>> I can't really speak about what the validation query is used
>> for because I have not looked at the code. However, I
>> thought it was to periodically test the connections in the
>> pool to make sure that they were still valid.
>>
>> Could you create a defect issue @
>> http://scarab.werken.com/issue about this problem? That way
>> we can make sure that it will be addressed.
>>
>> > -----Original Message-----
>> > From: Phee, Martin J (Jump Tech) [mailto:Marty.Phee@bp.com]
>> > Sent: Thursday, January 09, 2003 9:07 AM
>> > To: Turbine Users List
>> > Subject: Getting bad connections from Torque
>> >
>> >
>> > I'm having a problem with torque and oracle. Maybe it's my
>> > misunderstanding. Every once in a while I'm getting the
>> > following error in my turbine.log:
>> >
>> > [Tue Jan 07 08:52:13 CST 2003] -- ERROR -- Turbine.handleException:
>> > ORA-02068: following severe error from xxxxxxx
>> > ORA-03113: end-of-file on communication channel
>> >
>> > When torque returns a db connection isn't it supposed to
>> > check to see if it's still a good connection? Below is my
>> > torque setup. Only seems to happen after a weekend when no
>> > one has been using it for a while. What's the purpose of the
>> > validationQuery? I'm currently using 3.0-rc1. I'm about to
>> > upgrade to the release version once I'm done with
>> regression testing.
>> >
>> > torque.dsfactory.smrt_prod.factory=org.apache.torque.dsfactory
>> > .Jdbc2PoolData
>> > SourceFactory torque.dsfactory.smrt_prod.pool.defaultMaxActive=10
>> > torque.dsfactory.smrt_prod.pool.testOnBorrow=true
>> > torque.dsfactory.smrt_prod.pool.validationQuery=SELECT 1 from
>> > dual torque.dsfactory.smrt_prod.connection.driver =
>> > oracle.jdbc.driver.OracleDriver
>> > torque.dsfactory.smrt_prod.connection.url =
>> > jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS=(HOST=xxxxxx)(PROTOCOL
>> > =tcp)(PORT=152
>> > 1))(CONNECT_DATA=(SID=xxxxx)))
>> > torque.dsfactory.smrt_prod.connection.user =
>> > torque.dsfactory.smrt_prod.connection.password =
>> >
>> > --
>> > To unsubscribe, e-mail:
>> > <mailto:turbine-torque-user-> unsubscribe@jakarta.apache.org>
>> >
>> > For additional commands,
>> > e-mail: <ma...@jakarta.apache.org>
>> >
>> > --
>> > To unsubscribe, e-mail:
>> > <mailto:turbine-user-> unsubscribe@jakarta.apache.org>
>> > For
>> > additional commands,
>> > e-mail: <ma...@jakarta.apache.org>
>> >
>> >
>>
>> --
>> To unsubscribe, e-mail:
>> <mailto:turbine-user-> unsubscribe@jakarta.apache.org>
>> For
>> additional commands,
>> e-mail: <ma...@jakarta.apache.org>
>>
>> --
>> To unsubscribe, e-mail:
>> <mailto:turbine-user-> unsubscribe@jakarta.apache.org>
>> For
>> additional commands,
>> e-mail: <ma...@jakarta.apache.org>
>>
>>
>--
>To unsubscribe, e-mail: <ma...@jakarta.apache.org>
>For additional commands, e-mail: <ma...@jakarta.apache.org>
--
Dipl.-Inf. (Univ.) Henning P. Schmiedehausen -- Geschaeftsfuehrer
INTERMETA - Gesellschaft fuer Mehrwertdienste mbH hps@intermeta.de
Am Schwabachgrund 22 Fon.: 09131 / 50654-0 info@intermeta.de
D-91054 Buckenhof Fax.: 09131 / 50654-20