-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Hibernate C3p0 configuration connection issue
PostPosted: Tue Sep 23, 2014 8:21 am 
Newbie

Joined: Tue Sep 23, 2014 7:10 am
Posts: 2
Hi ,
in my project am using Spring & Hibernate with C3p0 connection pooling.
we are Mysql DB, many applications are accessing to this DB.
Max connections are 800 and 200 per user connections. there are atleat 5 user who access this DB for DML operations.

As per logs recently am getting transaction timeout exception and it's happening in production environment

jdbc.properties file
Code:
##########################Connection Pool Setting #######################
#######Basic Pool Configuration######
initialPoolSize=25
minPoolSize=25
maxPoolSize=250
maxIdleTime=3600
acquireIncrement=25

#######Configuring Connection Testing######
idleConnectionTestPeriod=3600
maxIdleTimeExcessConnections=3600
maxConnectionAge=3600
preferredTestQuery=select 1

#######Configuring Statement Pooling#######
maxStatements=200
numHelperThreads=5

#######Configuring Recovery From Database Outages#######
acquireRetryAttempts=3
AcquireRetryDelay=3000
BreakAfterAcquireFailure=false

#######Other DataSource Configuration#############
checkoutTimeout=3600
unreturnedConnectionTimeout=800
debugUnreturnedConnectionStackTraces=true
########################################################################

##########################Hibernate properties #######################
hibernate.mysql.dialect=org.hibernate.dialect.MySQLDialect
hibernate.show_sql=true
hibernate.format_sql=true
hibernate.connection.autocommit=false
hibernate.connection.release_mode=auto


and in the C3p0 logs says

Code:
DEBUG - trace com.mchange.v2.resourcepool.BasicResourcePool@5f7208e2 [managed: 41, unused: 28, excluded: 0] (e.g. com.mchange.v2.c3p0.impl.NewPooledConnection@2afca462)
DEBUG - checkoutStatement: com.mchange.v2.c3p0.stmt.GlobalMaxOnlyStatementCache stats -- total size: 50; checked out: 6; num connections: 20; num keys: 50

[C3P0PooledConnectionPoolManager-Helper Thread-#1] DEBUG - com.mchange.v2.c3p0.impl.NewPooledConnection@32db0feb closed by a client.
java.lang.Exception: DEBUG -- CLOSE BY CLIENT STACK TRACE
   at com.mchange.v2.c3p0.impl.NewPooledConnection.close(NewPooledConnection.java:627)
   at com.mchange.v2.c3p0.impl.NewPooledConnection.closeMaybeCheckedOut(NewPooledConnection.java:241)
   at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager.destroyResource(C3P0PooledConnectionPool.java:571)
   at com.mchange.v2.resourcepool.BasicResourcePool$1DestroyResourceTask.run(BasicResourcePool.java:1012)
   at com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:635)



please help me identify the root cause for this..
Thanks in advance


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.