-->
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: Decrease C3P0-Connection Pool after Failure
PostPosted: Wed Jan 16, 2008 3:00 am 
Newbie

Joined: Sat Sep 22, 2007 4:04 am
Posts: 7
Hello,

i am using hibernate with a c3p0 connection pool. Now i am a little bit worried. Allthough c3p0 sometimes closes unused connections, the number of managed connections is increasing with any connection-failure. Seems like broken connections hang up and could not be closed.

Here are my active Hibernate properties:
Code:
<property name="hibernate.connection.driver_class">com.microsoft.jdbc.sqlserver.SQLServerDriver</property>
...
<!-- C3PO  -->
<property name="c3p0.acquire_increment">1</property>
<property name="c3p0.idle_test_period">100</property>
<property name="c3p0.max_size">100</property>          
<property name="c3p0.max_statements">0</property>
<property name="c3p0.min_size">3</property>
<property name="c3p0.timeout">100</property>
<property name="c3p0.maxConnectionAge">100</property>


I have allready tried this c3p0 params:
* maxConnectionAge
* maxIdleTime
* maxIdleTimeExcessConnections

Whithout Connection failures the pool has this values:
Code:
trace com.mchange.v2.resourcepool.BasicResourcePool@e8eeca [managed: 3-4, unused: 3, excluded: 0] (e.g.


After some broken connections it looks like this:
Code:
trace com.mchange.v2.resourcepool.BasicResourcePool@e8eeca [managed: 10, unused: 2, excluded: 0] (e.g.


Is it possible to shrink the pool to the initial size again?

kind regards

Martin[/code][/list]


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.