[opencms-dev] Intermittent CmsDbSqlExceptions

Achim Westermann a.westermann at alkacon.com
Fri May 8 11:29:21 CEST 2009


Hi Brett,

seems like your db connections die in the pool used by opencms in long 
idle phases. This can be caused by the database or some firewall that 
closes long-idle connections.



You should turn on eviction in opencms.properties. This has been added 
to opencms.properties. This has been added round about 07/07:

# connections will be validated by evictor thread
db.pool.default.testWhileIdle=true

# number of milliseconds to sleep between runs of the evictor thread
# -1 means no idle connection evictor thread will be run
db.pool.default.timeBetweenEvictionRuns=3600000

# number of connections tested in a run of the evictor thread
db.pool.default.numTestsPerEvictionRun=3

# minimum amount of time in milliseconds a connection may be idle in the 
pool before it is eligable for eviction
db.pool.default.minEvictableIdleTime=1800000

# the query to validate connections
db.pool.default.testQuery=SELECT STRUCTURE_ID FROM CMS_OFFLINE_STRUCTURE 
WHERE RESOURCE_PATH = '/'



Kind Regards,
Achim.

-------------------
Achim Westermann

Alkacon Software GmbH  - The OpenCms Experts
http://www.alkacon.com - http://www.opencms.org




Brett Sheeran schrieb:
> Hi,
> 
> I raised this issue last year and my apologies for raising it again
> but it is driving me crazy. We have a problem with OpenCMS sometimes
> throwing the following error message:
> 
> org.opencms.db.CmsDbSqlException: An SQL error occurred when executing
> the following query: com.mysql.jdbc.PreparedStatement at eb98506:
> statement has been closed, no further internal information available.
> 
> Can anyone tell us how to stop this happening or even how to locate
> the source of the problem please? Details as follows.
> 
> Obviously, the user sees this error. The error only occurs sometimes,
> usually after a period when no one has hit the servers for at least
> several hours. Usually, we find the error occurs first thing in the
> morning after a period of inactivity overnight.
> 
> The error is difficult to duplicate because the problem never occurs
> when you reload the page after seeing the error.
> 
> The problem is not confined to a particular JSP, but is always the
> first JSP requested after a period of inactivity.
> 
> Incidentally, we are observing this problem on three servers running
> the same application but slightly different platforms. One server is
> running: Linux, Tomcat 5.5, MySQL 5.0, Java 1.6 and OpenCMS 7.0.4. The
> other servers are running: Windows Server 2003, Tomcat 6.0, MySQL 5.0,
> Java 1.6 and OpenCMS 7.0.5.
> 
> Any suggestions?
> 
> Thank you.
> 
> Regards
> 
> Brett
> New Media Innovation
> www.nminnovation.com
> 
> _______________________________________________
> This mail is sent to you from the opencms-dev mailing list
> To change your list options, or to unsubscribe from the list, please visit
> http://lists.opencms.org/mailman/listinfo/opencms-dev




More information about the opencms-dev mailing list