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.  [ 3 posts ] 
Author Message
 Post subject: Database max connections
PostPosted: Sat Jan 23, 2010 2:36 pm 
Newbie

Joined: Sat Jan 23, 2010 1:41 pm
Posts: 2
Hi,

While load testing an application that uses JPA/hibernate/spring with oracle database 10G, I found that although some 200 parallel users are simulated which should have made 200 DB connections, it never makes more than 40. This was monitored on the enterprise oracle server tool, by monitoring the real time hits on the schema.

I read that in the absence of any connection pooling, hibernate uses an internal pool which I earlier thought, was restricting the number of hits to 40 by having a max pool size like that. So, I configured C3p0 pool in the persistence.xml which is configured through Spring's Application context.

Doing the above config for the c3p0 pool doesn't make a diff to the num of concurrent database hits.

Persistence.xml has the c3p0 entry as:
Code:
           
            <property name="hibernate.connection.provider_class"                                value="org.hibernate.connection.C3P0ConnectionProvider" />           
            <property name="hibernate.c3p0.min_size" value="50"/>
            <property name="hibernate.c3p0.max_size" value="300"/>
            <property name="hibernate.c3p0.timeout" value="3000"/>
            <property name="hibernate.c3p0.max_statements" value="100"/>
            <property name="hibernate.c3p0.idle_test_period" value="3000"/>


Please advise if I am thinking in the wrong direction or any other pointers to the solution.

Thanks very much.
Gaurav Awasthi


Top
 Profile  
 
 Post subject: Re: Database max connections
PostPosted: Sat Jan 23, 2010 3:00 pm 
Expert
Expert

Joined: Tue May 13, 2008 3:42 pm
Posts: 919
Location: Toronto & Ajax Ontario www.hibernatemadeeasy.com
Is there any chance the restriction is happening at the database side?

_________________
Cameron McKenzie - Author of "Hibernate Made Easy" and "What is WebSphere?"
http://www.TheBookOnHibernate.com Check out my 'easy to follow' Hibernate & JPA Tutorials


Top
 Profile  
 
 Post subject: Re: Database max connections
PostPosted: Sat Jan 23, 2010 3:17 pm 
Newbie

Joined: Sat Jan 23, 2010 1:41 pm
Posts: 2
Not really, the db is configured to allow 500 connections.


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

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.