-->
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: Problem with c3p0 cache object
PostPosted: Sun Jul 15, 2012 5:30 am 
Newbie

Joined: Sun Jul 15, 2012 4:12 am
Posts: 1
Hi there,

I want to share a weird example. On production our application is throwing OOM exception, we took a heap dump and started to analyze that later we found problem with com.mchange.v2.c3p0.stmt.PerConnectionMaxOnlyStatementCache instance. The size of this object is about 50% of heap size. The application is running with billions of users and server goes down again and again.

This application is running on tomcat, where the tomcat connector allows 300 max concurrent requests and following are the c3p0 configurations.

jdbc.hibernate.c3p0.minPoolSize=2
jdbc.hibernate.c3p0.maxPoolSize=150
jdbc.hibernate.c3p0.maxIdleTime=0
jdbc.hibernate.c3p0.maxStatementsPerConnection=50
jdbc.hibernate.c3p0.numHelperThreads=6

From heap monitoring tool we are getting the following message

One instance of "com.mchange.v2.c3p0.stmt.PerConnectionMaxOnlyStatementCache" loaded by "org.apache.catalina.loader.WebappClassLoader @ 0x82f1c58" occupies 72 970 824 (57,75%) bytes. The memory is accumulated in one instance of "com.mchange.v2.c3p0.stmt.PerConnectionMaxOnlyStatementCache" loaded by "org.apache.catalina.loader.WebappClassLoader @ 0x82f1c58"


Please advise:-
What can be reason this instance taking such huge memory?
Are we running with right c3p0 configuration?
What are the recommended configurations for a heavy loaded application?

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.