[opencms-dev] Performance Tuning Questions

Christian Steinert christian_steinert at web.de
Tue Jul 21 17:19:47 CEST 2009


Dear Brett 

> Eviction was already activated with all the standard values.
> *However*, this was still useful advice because I found that *if* I
> increased numTestsPerEvictionRun, reduced timeBetweenEvictionRuns and
> reduced minEvictableIdleTime *then*, my SQL errors stopped and the
> number of active connections did not increase at the same rate.

It's worth to try if things work properly, if you force opencms to check each DB connection when it is taken from the pool.
I don't know how expensive that is, hopefully with the mysql query cache this should be very cheep but will probably still cost some latency.

For that, you need to set the test query (like you already have):
db.pool.default.testQuery=SELECT STRUCTURE_ID FROM CMS_OFFLINE_STRUCTURE WHERE RESOURCE_PATH = '/'

And then cause opencms to test when taking a connection from the pool:
db.pool.default.testOnBorrow=true


My suspicion is that still some connections are dying in the pool and since eviction cleans things slowly in the background, this would still mean that opencms might re-use a dead DB connection from time to time. With testOnBorrow, opencms should make sure that a connection is really alive before re-using it

Kind Regards
Christian
______________________________________________________
GRATIS für alle WEB.DE-Nutzer: Die maxdome Movie-FLAT!
Jetzt freischalten unter http://movieflat.web.de




More information about the opencms-dev mailing list