[prev in list] [next in list] [prev in thread] [next in thread] 

List:       jboss-user
Subject:    [JBoss-user] Re: Where has my memory gone?
From:       "David Rocks" <david.rocks () connecti ! net>
Date:       2003-03-31 10:59:50
[Download RAW message or body]

After a good look in my code I have tracked the leak to a certain area of our system. \
Although I am not really  sure what the bug is as JProbe seems to think that all is \
fine and I cannot seem to see an error with the code. Here is a brief description of \
the problem and the work around.

We have a composite entity structure (BMP) and the composite entity has a group of \
dependant persistable objects stored in a collection. I had a method in a session \
bean getDependant(). This calls findCompositeEntityBeanForDependant() on the entity \
home. I would then ask the returned entity to return the dependant object \
entityBean.getDependant(). The session bean would form a value object and pass it \
back to the client code.

I wanted to have the entity bean control access to the dependants to take advantage \
of pooling and have some level of transactional control. This piece of code was \
causing the problem. If I analyse the memory usage with JProbe it gives the \
impression that my objects and oracle objects get used and tidied up correctly.

By changing the session to simple create the dependant itself, form a value object \
and pass it back to the client ( completely ignoring the entity) the leak seems to go \
away. I really don't understand how the first way does not work.

I was using the thin client on both systems and getting the same problem. 
Production JBoss 2.4.4, Ora 9.2.0.1.0 (client and server ), Solaris 8. 
Develpoment JBoss 3.0.6, Ora 8.1.6 (client and server ), Win 2000. 
That tells me that it is our code but I can't see anything wrong

Our system launches on Friday with Toyota so I am tied up for time but I will look \
into this next week and try to find out a bit more information. See if I am doing \
anything wrong.

Thank for the input everyone.

David


Date: Sun, 30 Mar 2003 12:56:10 +1000
From: Matt Johnson <johnsonm@whitesmiths.com.au>
To: jboss-user@lists.sourceforge.net
Subject: Re: [JBoss-user] Where has my memory gone?
Reply-To: jboss-user@lists.sourceforge.net

To elaborate on Steve's comments, we were experiencing very similar 
symptoms to what you describe, and we resolved the problem initially by 
upgrading to Oracle 9.2.0.2.0 - there was a memory leak in the HP/UX 
JDBC OCI library in 9.2.0.1.0.  The first week was nice and quiet, but 
since then we've been getting intermittent crashes in Production - only 
now we can't reproduce it in testing.

This particular bug appears to have been specific to HP/UX and another 
platform (don't have the info to hand, but I know it wasn't Solaris), 
but I would strongly recommend you take a closer look at Oracle if 
you're using the OCI driver, or at any other JNI components if you're 
not - the symptoms really do smack of a native code leak.  It makes it 
less likely to be Oracle because you've got the problem using two 
different major versions (8i and 9i), but you never know...

We've had great troubles diagnosing our problem because none of the 
profilers are able to provide much info on what's going on in JNI land.

When you say you use 8i in dev and 9i on your servers, which specific 
versions of these do you use (both client and server side)?  You 
mentioned in another mail that you use classes12.zip - which Oracle 
release did you source this from, and do you use different versions in 
dev/prod, or the same?



Matt

Stephen Coy wrote:

> Are you using the OCI driver?
> 
> We're experiencing similar problems at our production site, but can't 
> reproduce it in testing. Our hardware is running HP-UX and the HP JVM.
> 
> The current theory is that the version of the OCI client software we 
> have on site is leaking memory in native code.
> 
> Steve Coy
> 
> On Friday, March 28, 2003, at 09:44  PM, David Rocks wrote:
> 
> > I am having a desperate problem with my JBoss app server. It seems to 
> > be leaking memory all over the place but after a week of debugging 
> > and JProbing I can just not find the problem. My architecture is 
> > session beans that link onto Entity beans that can have dependant 
> > objects. a la Composite entity design pattern, nothing radical. It 
> > seems that when we make a call to the session layer to create an 
> > entity with dependants from data in our oracle db then the server mem 
> > jumps 5 meg and never goes down. Keep going and we crash. We 
> > originally started with 2.4.4 but moving up to 3.0.6 did not seem to 
> > make a change. We develop on win 2000 but the leak still seems to be 
> > there on our Solaris servers.  We use oracle 8i in our dev 
> > environment and 9i on our servers. I have used JDK 1.3.1 and 1.4. It 
> > just seems to point to our code but where I just can't find. I have 
> > been through the code making sure that we close all of our 
> > connections to the database 20 times. nulling references as well.
> > 
> > I got JProbe to analyse the JVM that the app server runs on and it 
> > claims that the level of objects remains the same and the memory they 
> > take up is the same giving me the impression that is all OK. Looking 
> > at task manger tells a different story with the memory zooming up 
> > until the OutOfMemory Exception occurs. top on our Solaris servers 
> > shows that the memory never seems to be recovering as well.
> > 
> > If anybody can share a thought on why this is happening please feel 
> > free to share this with me. Even the obvious clue would be great. I 
> > have tried everything I know.
> > 
> > David Rocks
> > 
> > Software Development Manager
> > david.rocks@connecti.net
> 




--__--__--




-------------------------------------------------------
This SF.net email is sponsored by: ValueWeb: 
Dedicated Hosting for just $79/mo with 500 GB of bandwidth! 
No other company gives more support or power for your dedicated server
http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/
_______________________________________________
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic