-->
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: heap exhaustion using Hibernate 3.0 SessionFactory
PostPosted: Thu Jun 25, 2009 7:37 pm 
Newbie

Joined: Thu Jun 25, 2009 7:34 pm
Posts: 2
Relevant system configuration:

Websphere 6.1.0.17 – 4 nodes in a cluster/ but only running 1 active node
DB2 V9.5
Hibernate 3 for persistence layer.; second level cacheing is disabled.
Spring framework for transactionality and MVC for presentation layer.
IBM_HTTP_Server/6.1 Apache/2.0.47
IBM WebSphere MQ 7.0.0.1
IBM WebSphere MQ Broker v6.1

Background:

We have 4 schemas created in our database for which we have created a Session Factory wrapper and in our wrapper we
configure a factory per database to handle DB transactions. In our current traffic models we queue the majority of our
transactions to a common DB and one additional customer specific DB. Our current traffic levels are minimal.

Our session factory wrapper is a subclass of org.Hibernate.SessionFactory. Each factory is created only once at startup and stored into a hashmap
(Collections.synchronizeMap). We use HibernateTransactionManager to bind and manage our sessions and invoke TransactionSynchronizationManager
bindResource when a session is obtained and unbindResource when a session is no longer needed. Our HashMap inherits from LRUMap and SoftLimitMRUCache.

The problem:

After several days of relatively low traffic to our DBs, we get a java/lang/OutOfMemoryError with a “Forcing J9AllocateIndexableObject() to fail due to excessive GC”
and the heap is exhausted. After analysis of the dumps, we discover that a suspect of memory leak is the SessionFactory Object which we have created (notice
we have subclassed from Hibernate Session Factory.

We were running with 512 heap size for min/max on the JVM. We increased this to 1024 and had the problem occur again shortly thereafter..

What are some of the possibilities that would be root cause in causing this issue? What other tools/configuration can we use to diagnose this better?

Thanks very much
Bill


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.