Comment 51 for bug 1243551

Revision history for this message
Brian KimJohnson (briankimjohnson) wrote : Re: [Bug 1243551] Re: Spontaneous closing of the connection by BoneCP connection pool

As a result of this issue , my company reverted to 0.7.1 ​and it has been
much more stable.

On Tue, Sep 9, 2014 at 12:08 PM, Steven <email address hidden> wrote:

> This problem has a big impact on my application, no workaround seems have
> effect, should I revert to 0.71 ??
> Seems that there is no interest into fixing this issue.. there is
> something planned about this ?
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1243551
>
> Title:
> Spontaneous closing of the connection by BoneCP connection pool
>
> Status in BoneCP - Java Database Connection Pool:
> Triaged
>
> Bug description:
> Application (1 test component) is using BoneCP connection pool. All
> the things are usually working fine (getting connection, releasing,
> ....) but sometimes in the random time happen that some connection is
> spontaneously closed.
>
> This is the output from log4j:
>
>
> -----------------------------------------------------------------------------------------------
> com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: No
> operations allowed after connection closed.
> at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
> at
> sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
> at
> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
> at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
> 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:1013)
> at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:987)
> at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:982)
> at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:927)
> at
> com.mysql.jdbc.ConnectionImpl.throwConnectionClosedException(ConnectionImpl.java:1205)
> at com.mysql.jdbc.ConnectionImpl.checkClosed(ConnectionImpl.java:1197)
> at
> com.mysql.jdbc.ConnectionImpl.createStatement(ConnectionImpl.java:2483)
> at
> com.mysql.jdbc.ConnectionImpl.createStatement(ConnectionImpl.java:2465)
> at com.radar.database.Connection.createStatement(Connection.java:218)
> at
> com.jolbox.bonecp.ConnectionHandle.createStatement(ConnectionHandle.java:718)
> at
> com.arbitrage.live.factor.FactorComponent.calculateOverallFactors(FactorComponent.java:181)
> at
> com.arbitrage.live.factor.FactorComponent.access$1000(FactorComponent.java:28)
> at
> com.arbitrage.live.factor.FactorComponent$ProcessMatches.run(FactorComponent.java:139)
> at
> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
> at
> java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)
> at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)
> at
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98)
> at
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:180)
> at
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:204)
> 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:662)
>
>
> -----------------------------------------------------------------------------------------------
>
> So I don't know if it is bug, or just some configuration issue about
> liveness of the connection.
> Idle timeout is set to 60 seconds, min connections = 2, max connections
> = 5.
>
> When the connection was closed, it was normally used by 1 thread of
> application, so it wasn't in the pool, so I think that it should not
> be closed spontaneously.
>
> Thanks for reply.
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/bonecp/+bug/1243551/+subscriptions
>