MySQLNonTransientConnectionException with BoneCP 0.8.0-rc1

Bug #1109879 reported by Dragisa Krsmanovic
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
BoneCP
Incomplete
Undecided
Unassigned

Bug Description

I have a simple Grails app that I use for testing connection performance. All it does is primary key lookup in database.

During high load, with BoneCP 0.7.1.RELEASE I don't see any errors.

Same test with BoneCP 0.8.0-rc1 throws ocasional exception:

org.hibernate.exception.JDBCConnectionException: Cannot release connection
        at grails.plugin.cache.web.filter.PageFragmentCachingFilter.doFilter(PageFragmentCachingFilter.java:195)
        at grails.plugin.cache.web.filter.AbstractFilter.doFilter(AbstractFilter.java:63)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
        at java.lang.Thread.run(Thread.java:680)
Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: No operations allowed after connection closed.
        at com.mysql.jdbc.Util.handleNewInstance(Util.java:411)
        at com.mysql.jdbc.Util.getInstance(Util.java:386)
        at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1014)
        at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:988)
        at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:974)
        at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:919)
        at com.mysql.jdbc.ConnectionImpl.throwConnectionClosedException(ConnectionImpl.java:1269)
        at com.mysql.jdbc.ConnectionImpl.checkClosed(ConnectionImpl.java:1261)
        at com.mysql.jdbc.ConnectionImpl.setAutoCommit(ConnectionImpl.java:5029)
        at com.jolbox.bonecp.ConnectionHandle.setAutoCommit(ConnectionHandle.java:1247)
        at com.jolbox.bonecp.ConnectionHandle.<init>(ConnectionHandle.java:251)
        at com.jolbox.bonecp.ConnectionHandle.recreateConnectionHandle(ConnectionHandle.java:273)
        at com.jolbox.bonecp.ConnectionHandle.close(ConnectionHandle.java:476)

The error shows up intermittently. Around once per 1000 requests.

Configurations are identical. The only difference is version of BoneCP.

Revision history for this message
Wallace Wadge (wwadge) wrote :

What's your config? Can I have a sample test? Can you try it with 0.8.0-rc3-SNAPSHOT?

Changed in bonecp:
status: New → Incomplete
Revision history for this message
Robert Frey (rfrey74) wrote :
Download full text (6.1 KiB)

Hello,

I'm using BoneCP (0.8.0.RELEASE) as part of Play! 2.2.1, and I am having similar problems. My configuration is as follows:

db.default.driver=com.mysql.jdbc.Driver
db.default.url="jdbc:mysql://my-host/database-name"
db.default.user=user
db.default.password=password

The problem comes up after a period of idleness, and is intermittent. As you can see from the stacktrace below, the error occurs right after getting a connection. There is an attempt to set auto_commit, but it appears the connection the pool gave us was closed.

Thank you for your prompt attention to this issue.

@6g5hhg1nb: Execution exception in null:null
 at play.api.Application$class.handleError(Application.scala:293)
 at play.api.DefaultApplication.handleError(Application.scala:399)
 at play.core.server.netty.PlayDefaultUpstreamHandler$$anonfun$12$$anonfun$apply$1.applyOrElse(PlayDefaultUpstreamHandler.scala:165)
 at play.core.server.netty.PlayDefaultUpstreamHandler$$anonfun$12$$anonfun$apply$1.applyOrElse(PlayDefaultUpstreamHandler.scala:162)
 at scala.runtime.AbstractPartialFunction.apply(AbstractPartialFunction.scala:33)
 at scala.util.Failure$$anonfun$recover$1.apply(Try.scala:185)
 at scala.util.Try$.apply(Try.scala:161)
 at scala.util.Failure.recover(Try.scala:185)
 at scala.concurrent.Future$$anonfun$recover$1.apply(Future.scala:387)
 at scala.concurrent.Future$$anonfun$recover$1.apply(Future.scala:387)
 at scala.concurrent.impl.CallbackRunnable.run(Promise.scala:29)
 at play.api.libs.iteratee.Execution$$anon$1.execute(Execution.scala:43)
 at scala.concurrent.impl.CallbackRunnable.executeWithValue(Promise.scala:37)
 at scala.concurrent.impl.Promise$DefaultPromise.tryComplete(Promise.scala:133)
 at scala.concurrent.Promise$class.complete(Promise.scala:55)
 at scala.concurrent.impl.Promise$DefaultPromise.complete(Promise.scala:58)
 at scala.concurrent.Future$$anonfun$flatMap$1$$anonfun$apply$3.apply(Future.scala:278)
 at scala.concurrent.Future$$anonfun$flatMap$1$$anonfun$apply$3.apply(Future.scala:278)
 at scala.concurrent.impl.CallbackRunnable.run(Promise.scala:29)
 at scala.concurrent.Future$InternalCallbackExecutor$Batch$$anonfun$run$1.processBatch$1(Future.scala:731)
 at scala.concurrent.Future$InternalCallbackExecutor$Batch$$anonfun$run$1.apply$mcV$sp(Future.scala:746)
 at scala.concurrent.Future$InternalCallbackExecutor$Batch$$anonfun$run$1.apply(Future.scala:723)
 at scala.concurrent.Future$InternalCallbackExecutor$Batch$$anonfun$run$1.apply(Future.scala:723)
 at scala.concurrent.BlockContext$.withBlockContext(BlockContext.scala:72)
 at scala.concurrent.Future$InternalCallbackExecutor$Batch.run(Future.scala:722)
 at scala.concurrent.Future$InternalCallbackExecutor$.scala$concurrent$Future$InternalCallbackExecutor$$unbatchedExecute(Future.scala:782)
 at scala.concurrent.Future$InternalCallbackExecutor$.execute(Future.scala:773)
 at scala.concurrent.impl.CallbackRunnable.executeWithValue(Promise.scala:37)
 at scala.concurrent.impl.Promise$DefaultPromise.tryComplete(Promise.scala:133)
 at scala.concurrent.Promise$class.complete(Promise.scala:55)
 at scala.concurrent.impl.Promise$DefaultPromise.complete(Promise.scala:58)
 at scala.concurrent.Future$$anonf...

Read more...

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.