grais Communications link failure

WARNING: Failed to execute: select * from cl_service_set because: Communications link failure

The last packet successfully received from the server was 345,489 milliseconds ago.  The last packet sent successfully to the server was 1 milliseconds ago.
2015-11-11 18:02:06,233 [http-bio-8080-exec-5] ERROR errors.GrailsExceptionResolver  - MySQLNonTransientConnectionException occurred when processing request: [GET] /Xxxxx/xxxx/xxxx
Communications link failure during commit(). Transaction resolution unknown.. Stacktrace follows:
com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Communications link failure during commit(). Transaction resolution unknown.
	at com.mysql.jdbc.Util.handleNewInstance(Util.java:404)
	at com.mysql.jdbc.Util.getInstance(Util.java:387)
	at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:919)
	at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:898)
	at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:887)
	at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:862)
	at com.mysql.jdbc.ConnectionImpl.commit(ConnectionImpl.java:1621)
	at grails.plugin.cache.web.filter.PageFragmentCachingFilter.doFilter(PageFragmentCachingFilter.java:198)
	at grails.plugin.cache.web.filter.AbstractFilter.doFilter(AbstractFilter.java:63)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1146)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
	at java.lang.Thread.run(Thread.java:701)


解决办法参考:
http://stackoverflow.com/questions/12532003/how-do-i-configure-c3p0-for-a-grails-2-x-application-with-multiple-datasources

http://stackoverflow.com/questions/3404255/configuring-grails-to-use-own-datasource-implementation-or-to-proxy-the-standard

http://stackoverflow.com/questions/11125962/correct-way-to-keep-pooled-connections-alive-or-time-them-out-and-get-fresh-one

猜你喜欢

转载自583497282.iteye.com/blog/2256436