mysql - Connection pool issue: Connection has already been closed -


I am using Grails 2.4.2, Tomcat 7 and MySQL 5.6.17 and I'm having trouble in connection pool is. After a while my application randomly reports the following errors.

  2014-07-24 08: 24: 35,012 [http-bio-127.0.0.1-50000-exec-9] Error organization org.hibernate .engine.jdbc.spi.SqlExceptionHelper - Connection Already stopped.   

and

  2014-07-25 10:55:55 12,018 [http-bio-127.0.0.1-50000-exec-6] Error organization codehaus .groovy.grails.web.errors.GrailsExceptionResolver - SQLException occurred while processing the request has been [gET] / controller / database connection already closed .. stacktrace is as follows: java.sql.SQLException: connection already Closed. On grails.plugin.cache.web.filter.PageFragmentCachingFilter.doFilter grails.plugin.cache.web.filter.AbstractFilter.doFilter (AbstractFilter.java:63) (PageFragmentCachingFilter.java:189) on grails.plugin.springsecurity.web Grails.plugin.springsecurity.web.authentication.logout.MutableLogoutFilter.doFilter on .filter.GrailsAnonymousAuthenticationFilter.doFilter (GrailsAnonymousAuthenticationFilter.java:53) on grails.plugin.springsecurity.web.authentication.RequestHolderAuthenticationFilter.doFilter (RequestHolderAuthenticationFilter.java:49) on java.lang.Thread on java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1145) on java.util.concurrent.ThreadPoolExecutor $ Worker.run (ThreadPoolExecutor.java:615) (MutableLogoutFilter.java:82).  $ TOMCAT_HOME / conf / context.xml   
     

The JNDI data source resource defined in (Thread. Java: 745) code> & lt; Resource Name = "jdbc / xxx" auth = "container" type = "javax.sql.DataSource" user name = "user" password d = "password" driverClassName = "com.mysql.jdbc.Driver" factory = "org. apache.tomcat.jdbc.pool.DataSourceFactory "url =" JDBC: mysql: // localhost: 3306 / db generateSimpleParameterMetadata = true "validationQuery = select" 1 "validationInterval =" 30000 "initialSize =" 5 "maxActive =" 50 "minIdle =" 5 "maxIdle =" 30 "maxWait =" 10000 "timeBetweenEvictionRunsMillis =" 5000 "minEvictableIdleTimeMillis =" 55000 "testOnBorrow =" true "are deleted =" true "deleted Hambnd the timeout made =" 55 "/ & Gt;

Do any of you have any experience on this topic and can help me on this?

Switching to the C3P0 connection pool worked.

  & lt; Resource auth = "Container" Details = "DB Connection" driverClass = "com.mysql.jdbc.Driver" maxPoolSize = "10" minPoolSize = "2" acquireIncrement = "1" name = "JDBC / xxx" user = "user" password = "password" factory = "org.apache.naming.factory.BeanFactory" type = "com .mchange.v2.c3p0.ComboPooledDataSource" jdbcUrl = "jdbc: mysql: // Sthaniyhost: 3306 / dB? generate SimplParameterMetadata = True "/>    

Comments

Popular posts from this blog

ios - Adding an SKSpriteNode to SKScene from a child SKSpriteNode -

Matlab transpose a table vector -

c# - Textbox not clickable but editable -