You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-user@portals.apache.org by Linus Kamb <ka...@emsc-csem.org> on 2010/01/25 15:03:57 UTC
database connections
Hi,
I have recently had a couple of instances where the Jetspeed database
connections appear to have been lost, either timed out from inactivity, or
there has been a network interruption, or not quite sure what. I believe it
is the timeout, but I'm not certain. In any case, over the weekend,
catalina.out filled up with 145k SQLExceptions of:
java.sql.SQLException: Io exception: Connection reset
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:179)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:333)
at
oracle.jdbc.driver.OracleConnection.setAutoCommit(OracleConnection.java:1224
)
at
org.apache.commons.dbcp.DelegatingConnection.setAutoCommit(DelegatingConnect
ion.java:331)
at
org.apache.commons.dbcp.PoolingDataSource$PoolGuardConnectionWrapper.setAuto
Commit(PoolingDataSource.java:317)
at
org.apache.jetspeed.statistics.impl.BatchedStatistics.flush(BatchedStatistic
s.java:162)
at
org.apache.jetspeed.statistics.impl.BatchedStatistics.checkAndDoFlush(Batche
dStatistics.java:87)
at
org.apache.jetspeed.statistics.impl.BatchedStatistics.run(BatchedStatistics.
java:133)
at java.lang.Thread.run(Thread.java:619)
java.sql.SQLException: Io exception: Broken pipe
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:179)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:333)
at
oracle.jdbc.driver.OracleConnection.setAutoCommit(OracleConnection.java:1224
)
at
org.apache.commons.dbcp.DelegatingConnection.setAutoCommit(DelegatingConnect
ion.java:331)
at
org.apache.commons.dbcp.PoolingDataSource$PoolGuardConnectionWrapper.setAuto
Commit(PoolingDataSource.java:317)
at
org.apache.jetspeed.statistics.impl.BatchedStatistics.flush(BatchedStatistic
s.java:162)
at
org.apache.jetspeed.statistics.impl.BatchedStatistics.checkAndDoFlush(Batche
dStatistics.java:87)
at
org.apache.jetspeed.statistics.impl.BatchedStatistics.run(BatchedStatistics.
java:133)
at java.lang.Thread.run(Thread.java:619)
java.sql.SQLException: Io exception: Broken pipe
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
[.]
Is the DataSource configured, or configurable, to check that the connection
is still valid before returning it? I know such a thing is, in general,
possible for the Apache PoolingDataSource, but I don't see it in the
Jetspeed configuration.
I'm running Jetspeed 2.1.3 on Linux, talking to Oracle 10, and looking in
[JetspeedInstall]/database/database.properites
The datasource.xml file (from both database/assembly. and
webapps/Jetspeed/WEB-INF/assembly.) seems to be default configuration using
Spring JNDI.
thanks,
Linus
Re: database connections
Posted by Ron Wheeler <rw...@artifact-software.com>.
You can also increase the amount of time that your database will wait
for an idle connection before timing out.
This is database dependent and probably has to be higher on your test
system than in production but we had to increase ours to allow the
weekend to go by without MySQL dropping the connection.
Ron
Linus Kamb wrote:
> that looks like what I was looking for.
>
> thanks a lot!
>
>
>> -----Message d'origine-----
>> De : Woonsan Ko [mailto:woon_san@yahoo.com]
>> Envoyé : Monday, January 25, 2010 3:24 PM
>> À : Jetspeed Users List
>> Objet : Re: database connections
>>
>> Hi Linus,
>>
>> One possible solution is to configure "validationQuery" for the dbcp,
>> which will validate the pooled connection before using by default.
>> If you installed Jetspeed onto Tomcat, then you can find Jetspeed context
>> descriptor (e.g. $CATALINA_HOME/conf/Catalina/localhost/jetspeed.xml).
>> You can add "validationQuery" property with a value, "select 1 from dual",
>> in the "jdbc/jetspeed" resource configuration.
>>
>> Please refer the followings for details:
>> - http://tomcat.apache.org/tomcat-5.5-doc/jndi-resources-howto.html
>> - http://commons.apache.org/dbcp/configuration.html
>>
>>
>> Regards,
>>
>> Woonsan
>>
>>
>>
>>
>> ----- Original Message ----
>>
>>> From: Linus Kamb <ka...@emsc-csem.org>
>>> To: jetspeed-user@portals.apache.org
>>> Sent: Mon, January 25, 2010 3:03:57 PM
>>> Subject: database connections
>>>
>>> Hi,
>>>
>>>
>>>
>>> I have recently had a couple of instances where the Jetspeed database
>>> connections appear to have been lost, either timed out from inactivity,
>>>
>> or
>>
>>> there has been a network interruption, or not quite sure what. I
>>>
>> believe it
>>
>>> is the timeout, but I'm not certain. In any case, over the weekend,
>>> catalina.out filled up with 145k SQLExceptions of:
>>>
>>>
>>>
>>> java.sql.SQLException: Io exception: Connection reset
>>>
>>> at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
>>>
>>> at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:179)
>>>
>>> at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:333)
>>>
>>> at
>>>
>>>
>> oracle.jdbc.driver.OracleConnection.setAutoCommit(OracleConnection.java:12
>> 24
>>
>>> )
>>>
>>> at
>>>
>>>
>> org.apache.commons.dbcp.DelegatingConnection.setAutoCommit(DelegatingConne
>> ct
>>
>>> ion.java:331)
>>>
>>> at
>>>
>>>
>> org.apache.commons.dbcp.PoolingDataSource$PoolGuardConnectionWrapper.setAu
>> to
>>
>>> Commit(PoolingDataSource.java:317)
>>>
>>> at
>>>
>>>
>> org.apache.jetspeed.statistics.impl.BatchedStatistics.flush(BatchedStatist
>> ic
>>
>>> s.java:162)
>>>
>>> at
>>>
>>>
>> org.apache.jetspeed.statistics.impl.BatchedStatistics.checkAndDoFlush(Batc
>> he
>>
>>> dStatistics.java:87)
>>>
>>> at
>>>
>>>
>> org.apache.jetspeed.statistics.impl.BatchedStatistics.run(BatchedStatistic
>> s.
>>
>>> java:133)
>>>
>>> at java.lang.Thread.run(Thread.java:619)
>>>
>>> java.sql.SQLException: Io exception: Broken pipe
>>>
>>> at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
>>>
>>> at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:179)
>>>
>>> at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:333)
>>>
>>> at
>>>
>>>
>> oracle.jdbc.driver.OracleConnection.setAutoCommit(OracleConnection.java:12
>> 24
>>
>>> )
>>>
>>> at
>>>
>>>
>> org.apache.commons.dbcp.DelegatingConnection.setAutoCommit(DelegatingConne
>> ct
>>
>>> ion.java:331)
>>>
>>> at
>>>
>>>
>> org.apache.commons.dbcp.PoolingDataSource$PoolGuardConnectionWrapper.setAu
>> to
>>
>>> Commit(PoolingDataSource.java:317)
>>>
>>> at
>>>
>>>
>> org.apache.jetspeed.statistics.impl.BatchedStatistics.flush(BatchedStatist
>> ic
>>
>>> s.java:162)
>>>
>>> at
>>>
>>>
>> org.apache.jetspeed.statistics.impl.BatchedStatistics.checkAndDoFlush(Batc
>> he
>>
>>> dStatistics.java:87)
>>>
>>> at
>>>
>>>
>> org.apache.jetspeed.statistics.impl.BatchedStatistics.run(BatchedStatistic
>> s.
>>
>>> java:133)
>>>
>>> at java.lang.Thread.run(Thread.java:619)
>>>
>>> java.sql.SQLException: Io exception: Broken pipe
>>>
>>> at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
>>>
>>> [.]
>>>
>>>
>>>
>>> Is the DataSource configured, or configurable, to check that the
>>>
>> connection
>>
>>> is still valid before returning it? I know such a thing is, in general,
>>> possible for the Apache PoolingDataSource, but I don't see it in the
>>> Jetspeed configuration.
>>>
>>>
>>>
>>> I'm running Jetspeed 2.1.3 on Linux, talking to Oracle 10, and looking
>>>
>> in
>>
>>> [JetspeedInstall]/database/database.properites
>>>
>>>
>>>
>>> The datasource.xml file (from both database/assembly. and
>>> webapps/Jetspeed/WEB-INF/assembly.) seems to be default configuration
>>>
>> using
>>
>>> Spring JNDI.
>>>
>>>
>>>
>>> thanks,
>>>
>>> Linus
>>>
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
>> For additional commands, e-mail: jetspeed-user-help@portals.apache.org
>>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
> For additional commands, e-mail: jetspeed-user-help@portals.apache.org
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-user-help@portals.apache.org
RE: database connections
Posted by Linus Kamb <ka...@emsc-csem.org>.
that looks like what I was looking for.
thanks a lot!
> -----Message d'origine-----
> De : Woonsan Ko [mailto:woon_san@yahoo.com]
> Envoyé : Monday, January 25, 2010 3:24 PM
> À : Jetspeed Users List
> Objet : Re: database connections
>
> Hi Linus,
>
> One possible solution is to configure "validationQuery" for the dbcp,
> which will validate the pooled connection before using by default.
> If you installed Jetspeed onto Tomcat, then you can find Jetspeed context
> descriptor (e.g. $CATALINA_HOME/conf/Catalina/localhost/jetspeed.xml).
> You can add "validationQuery" property with a value, "select 1 from dual",
> in the "jdbc/jetspeed" resource configuration.
>
> Please refer the followings for details:
> - http://tomcat.apache.org/tomcat-5.5-doc/jndi-resources-howto.html
> - http://commons.apache.org/dbcp/configuration.html
>
>
> Regards,
>
> Woonsan
>
>
>
>
> ----- Original Message ----
> > From: Linus Kamb <ka...@emsc-csem.org>
> > To: jetspeed-user@portals.apache.org
> > Sent: Mon, January 25, 2010 3:03:57 PM
> > Subject: database connections
> >
> > Hi,
> >
> >
> >
> > I have recently had a couple of instances where the Jetspeed database
> > connections appear to have been lost, either timed out from inactivity,
> or
> > there has been a network interruption, or not quite sure what. I
> believe it
> > is the timeout, but I'm not certain. In any case, over the weekend,
> > catalina.out filled up with 145k SQLExceptions of:
> >
> >
> >
> > java.sql.SQLException: Io exception: Connection reset
> >
> > at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
> >
> > at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:179)
> >
> > at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:333)
> >
> > at
> >
> oracle.jdbc.driver.OracleConnection.setAutoCommit(OracleConnection.java:12
> 24
> > )
> >
> > at
> >
> org.apache.commons.dbcp.DelegatingConnection.setAutoCommit(DelegatingConne
> ct
> > ion.java:331)
> >
> > at
> >
> org.apache.commons.dbcp.PoolingDataSource$PoolGuardConnectionWrapper.setAu
> to
> > Commit(PoolingDataSource.java:317)
> >
> > at
> >
> org.apache.jetspeed.statistics.impl.BatchedStatistics.flush(BatchedStatist
> ic
> > s.java:162)
> >
> > at
> >
> org.apache.jetspeed.statistics.impl.BatchedStatistics.checkAndDoFlush(Batc
> he
> > dStatistics.java:87)
> >
> > at
> >
> org.apache.jetspeed.statistics.impl.BatchedStatistics.run(BatchedStatistic
> s.
> > java:133)
> >
> > at java.lang.Thread.run(Thread.java:619)
> >
> > java.sql.SQLException: Io exception: Broken pipe
> >
> > at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
> >
> > at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:179)
> >
> > at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:333)
> >
> > at
> >
> oracle.jdbc.driver.OracleConnection.setAutoCommit(OracleConnection.java:12
> 24
> > )
> >
> > at
> >
> org.apache.commons.dbcp.DelegatingConnection.setAutoCommit(DelegatingConne
> ct
> > ion.java:331)
> >
> > at
> >
> org.apache.commons.dbcp.PoolingDataSource$PoolGuardConnectionWrapper.setAu
> to
> > Commit(PoolingDataSource.java:317)
> >
> > at
> >
> org.apache.jetspeed.statistics.impl.BatchedStatistics.flush(BatchedStatist
> ic
> > s.java:162)
> >
> > at
> >
> org.apache.jetspeed.statistics.impl.BatchedStatistics.checkAndDoFlush(Batc
> he
> > dStatistics.java:87)
> >
> > at
> >
> org.apache.jetspeed.statistics.impl.BatchedStatistics.run(BatchedStatistic
> s.
> > java:133)
> >
> > at java.lang.Thread.run(Thread.java:619)
> >
> > java.sql.SQLException: Io exception: Broken pipe
> >
> > at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
> >
> > [.]
> >
> >
> >
> > Is the DataSource configured, or configurable, to check that the
> connection
> > is still valid before returning it? I know such a thing is, in general,
> > possible for the Apache PoolingDataSource, but I don't see it in the
> > Jetspeed configuration.
> >
> >
> >
> > I'm running Jetspeed 2.1.3 on Linux, talking to Oracle 10, and looking
> in
> > [JetspeedInstall]/database/database.properites
> >
> >
> >
> > The datasource.xml file (from both database/assembly. and
> > webapps/Jetspeed/WEB-INF/assembly.) seems to be default configuration
> using
> > Spring JNDI.
> >
> >
> >
> > thanks,
> >
> > Linus
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
> For additional commands, e-mail: jetspeed-user-help@portals.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-user-help@portals.apache.org
Re: database connections
Posted by Woonsan Ko <wo...@yahoo.com>.
Hi Linus,
One possible solution is to configure "validationQuery" for the dbcp, which will validate the pooled connection before using by default.
If you installed Jetspeed onto Tomcat, then you can find Jetspeed context descriptor (e.g. $CATALINA_HOME/conf/Catalina/localhost/jetspeed.xml).
You can add "validationQuery" property with a value, "select 1 from dual", in the "jdbc/jetspeed" resource configuration.
Please refer the followings for details:
- http://tomcat.apache.org/tomcat-5.5-doc/jndi-resources-howto.html
- http://commons.apache.org/dbcp/configuration.html
Regards,
Woonsan
----- Original Message ----
> From: Linus Kamb <ka...@emsc-csem.org>
> To: jetspeed-user@portals.apache.org
> Sent: Mon, January 25, 2010 3:03:57 PM
> Subject: database connections
>
> Hi,
>
>
>
> I have recently had a couple of instances where the Jetspeed database
> connections appear to have been lost, either timed out from inactivity, or
> there has been a network interruption, or not quite sure what. I believe it
> is the timeout, but I'm not certain. In any case, over the weekend,
> catalina.out filled up with 145k SQLExceptions of:
>
>
>
> java.sql.SQLException: Io exception: Connection reset
>
> at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
>
> at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:179)
>
> at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:333)
>
> at
> oracle.jdbc.driver.OracleConnection.setAutoCommit(OracleConnection.java:1224
> )
>
> at
> org.apache.commons.dbcp.DelegatingConnection.setAutoCommit(DelegatingConnect
> ion.java:331)
>
> at
> org.apache.commons.dbcp.PoolingDataSource$PoolGuardConnectionWrapper.setAuto
> Commit(PoolingDataSource.java:317)
>
> at
> org.apache.jetspeed.statistics.impl.BatchedStatistics.flush(BatchedStatistic
> s.java:162)
>
> at
> org.apache.jetspeed.statistics.impl.BatchedStatistics.checkAndDoFlush(Batche
> dStatistics.java:87)
>
> at
> org.apache.jetspeed.statistics.impl.BatchedStatistics.run(BatchedStatistics.
> java:133)
>
> at java.lang.Thread.run(Thread.java:619)
>
> java.sql.SQLException: Io exception: Broken pipe
>
> at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
>
> at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:179)
>
> at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:333)
>
> at
> oracle.jdbc.driver.OracleConnection.setAutoCommit(OracleConnection.java:1224
> )
>
> at
> org.apache.commons.dbcp.DelegatingConnection.setAutoCommit(DelegatingConnect
> ion.java:331)
>
> at
> org.apache.commons.dbcp.PoolingDataSource$PoolGuardConnectionWrapper.setAuto
> Commit(PoolingDataSource.java:317)
>
> at
> org.apache.jetspeed.statistics.impl.BatchedStatistics.flush(BatchedStatistic
> s.java:162)
>
> at
> org.apache.jetspeed.statistics.impl.BatchedStatistics.checkAndDoFlush(Batche
> dStatistics.java:87)
>
> at
> org.apache.jetspeed.statistics.impl.BatchedStatistics.run(BatchedStatistics.
> java:133)
>
> at java.lang.Thread.run(Thread.java:619)
>
> java.sql.SQLException: Io exception: Broken pipe
>
> at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
>
> [.]
>
>
>
> Is the DataSource configured, or configurable, to check that the connection
> is still valid before returning it? I know such a thing is, in general,
> possible for the Apache PoolingDataSource, but I don't see it in the
> Jetspeed configuration.
>
>
>
> I'm running Jetspeed 2.1.3 on Linux, talking to Oracle 10, and looking in
> [JetspeedInstall]/database/database.properites
>
>
>
> The datasource.xml file (from both database/assembly. and
> webapps/Jetspeed/WEB-INF/assembly.) seems to be default configuration using
> Spring JNDI.
>
>
>
> thanks,
>
> Linus
---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-user-help@portals.apache.org