[Logo] Forums for GrailsFlow, Weceem, XSLfast
  [Search] Search   [Recent Topics] Recent Topics   [Hottest Topics] Hottest Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
jdbc connection timeout for Weceem plugin  XML
Forum Index » Weceem Forum
Author Message
gary.moore



Joined: 12/07/2011 23:47:25
Messages: 6
Offline

Using the Weceem plugin. After periods of inactivity I get a java.sql.SQLException: Connection is closed error. I normally handle this with DBCP properties in DataSource.groovy thusly:

pooled = true
driverClassName = "com.mysql.jdbc.Driver"
dialect="org.hibernate.dialect.MySQL5InnoDBDialect"
hibernate {
cache.use_second_level_cache =true
cache.use_query_cache = true
cache.provider_class = 'net.sf.ehcache.hibernate.EhCacheProvider'
naming_strategy = org.hibernate.cfg.DefaultNamingStrategy
dialect="org.hibernate.dialect.MySQL5InnoDBDialect"
}
// DBCP "Keep Alive"
properties {
maxActive = 50
maxIdle = 25
minIdle = 1
initialSize = 1
minEvictableIdleTimeMillis = 60000
timeBetweenEvictionRunsMillis = 60000
numTestsPerEvictionRun = 3
maxWait = 10000
testOnBorrow = true
testWhileIdle = true
testOnReturn = false
validationQuery = "SELECT 1"
}

I can't figure out why this is not working for the Weceem plugin? Any help is appreciated.
Gary

Gary Moore
IT Specialist
NAL/ARS/USDA
marcpalmer



Joined: 04/06/2009 13:36:35
Messages: 303
Location: UK
Offline

Hi Gary,

It sounds like something is returning a stale connection. Weceem does nothing special here, its all plain Grails GORM.

DBCP pool has known issues however. I suggest you try using the Tomcat-pool (there is a grails plugin for it) that apparently performs and works better.

However you might also want to verify that your production system is running with a good up to date MySQL JDBC driver.

Thanks
Marc

- -
Twitter: wangjammer5
Blog: http://www.anyware.co.uk
Grails plugins: http://www.grailsrocks.com
[WWW]
 
Forum Index » Weceem Forum
Go to:   
Powered by JForum 2.1.8 © JForum Team