Reputation: 1464
I got a lot of Aborted connection
messages on DB side - [Note] Aborted connection 11043 to db: 'mysql' user: 'mysql' host: Got an error reading communication packets
.
I have no problem with the application and the DB, but I wonder why I getting these messages.
Could it be because hibernate.c3p0.idle_test_periods
is higher than hibernate.c3p0.timeout
?
Here is the hibernate configuration file:
hibernate.id.new_generator_mappings=false
hibernate.connection.provider_class=org.hibernate.connection.C3P0ConnectionProvider
hibernate.format_sql=false
hibernate.max_fetch_depth=3
hibernate.show_sql=false
hibernate.use_sql_comments=false
hibernate.connection.driver_class=com.mysql.jdbc.Driver
hibernate.dialect=com.p.db.pMySqlDialect
hibernate.connection.release_mode=after_transaction
hibernate.c3p0.acquire_increment=1
hibernate.c3p0.idle_test_period=10
hibernate.c3p0.timeout=0
hibernate.c3p0.max_statements=0
hibernate.c3p0.min_size=3
hibernate.c3p0.max_size=400
hibernate.c3p0.preferredTestQuery=select 1
hibernate.c3p0.acquireRetryAttempts=5
hibernate.c3p0.acquireRetryDelay=1000
hibernate.c3p0.breakAfterAcquireFailure=false
hibernate.c3p0.testConnectionOnCheckin=false
hibernate.c3p0.testConnectionOnCheckout=false
DB access log:
DEBUG [C3P0PooledConnectionPoolManager[identityToken->z8kfsx9l7vpkfr1egte0l|cf2bf60]-HelperThread-#2] [UID:, MSG_ID:] [com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool] <Test of PooledConnection [com.mchange.v2.c3p0.impl.NewPooledConnection@41d8a248] on IDLE CHECK has SUCCEEDED.>
DEBUG [C3P0PooledConnectionPoolManager[identityToken->z8kfsx9l7vpkfr1egte0l|cf2bf60]-HelperThread-#1] [UID:, MSG_ID:] [com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool] <Testing PooledConnection [com.mchange.v2.c3p0.impl.NewPooledConnection@7d10203] on IDLE CHECK.>
DEBUG [C3P0PooledConnectionPoolManager[identityToken->z8kfsx9l7vpkfr1egte0l|cf2bf60]-HelperThread-#0] [UID:, MSG_ID:] [com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool] <Testing PooledConnection [com.mchange.v2.c3p0.impl.NewPooledConnection@264d3257] on IDLE CHECK.>
DEBUG [C3P0PooledConnectionPoolManager[identityToken->z8kfsx9l7vpkfr1egte0l|cf2bf60]-HelperThread-#2] [UID:, MSG_ID:] [com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool] <Testing PooledConnection [com.mchange.v2.c3p0.impl.NewPooledConnection@ea7e8fb] on IDLE CHECK.>
DEBUG [C3P0PooledConnectionPoolManager[identityToken->z8kfsx9l7vpkfr1egte0l|cf2bf60]-HelperThread-#0] [UID:, MSG_ID:] [com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool] <Test of PooledConnection [com.mchange.v2.c3p0.impl.NewPooledConnection@264d3257] on IDLE CHECK has SUCCEEDED.>
DEBUG [C3P0PooledConnectionPoolManager[identityToken->z8kfsx9l7vpkfr1egte0l|cf2bf60]-HelperThread-#1] [UID:, MSG_ID:] [com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool] <Test of PooledConnection [com.mchange.v2.c3p0.impl.NewPooledConnection@7d10203] on IDLE CHECK has SUCCEEDED.>
DEBUG [C3P0PooledConnectionPoolManager[identityToken->z8kfsx9l7vpkfr1egte0l|cf2bf60]-HelperThread-#0] [UID:, MSG_ID:] [com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool] <Testing PooledConnection [com.mchange.v2.c3p0.impl.NewPooledConnection@2cb753e7] on IDLE CHECK.>
DEBUG [C3P0PooledConnectionPoolManager[identityToken->z8kfsx9l7vpkfr1egte0l|cf2bf60]-HelperThread-#2] [UID:, MSG_ID:] [com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool] <Test of PooledConnection
Upvotes: 1
Views: 422
Reputation: 14073
Connections eventually go stale. Please configure some Connection testing. The simplest thing to do would be to just modify your config so that
hibernate.c3p0.testConnectionOnCheckout=true
Or, see c3p0 docs.
Upvotes: 1