File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Performance and the fly likes Memory Increasing--Time to figure out why Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Performance
Bookmark "Memory Increasing--Time to figure out why" Watch "Memory Increasing--Time to figure out why" New topic
Author

Memory Increasing--Time to figure out why

Russ Ray
Ranch Hand

Joined: Feb 11, 2003
Posts: 52
I have a web application. It is constructed using J2EE, struts, Oracle, and WAS. As each user logs into the application, the size of the application grows. I repeat this step 10 times with a new browser each time. The application continues to grow. I do not see and decrease in the application size. We have studied the database connections and have ensured we are closing connections, resultsets and statements.

What I would like to know from the more experience performance users is what are some tools and techniques I can use to isolate this issue? I would like to discover why the application size is still growing even though the user is killing his browser each session.

Thank you in advance to reading and giving my question serious thought!

Russ
Ilja Preuss
author
Sheriff

Joined: Jul 11, 2001
Posts: 14112
A good profiler can help you find out what objects you have in memory, and what holds them from being garbage collected. We are using JProfiler, which is quite worth its money, in my opinion.

Do you put anything into sessions? You need to remember that your server doesn't notice when you close a browser, so the session will live on until you either destroy it programmatically (when the user explicitely logs out, for example), or it times out (which in Tomcat, for example, happens after half an hour per default).


The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
Russell Ray
Ranch Hand

Joined: Apr 25, 2005
Posts: 116
Ilja:

Thank you very much....... I will look into the JProfiler for WSAD today. WASD has a profiler but I am not sure it is the same. I also need to look into Session Management and how to "clean up" the session. Do you have a good book, chapter of a book, or website that may go into detail on how to manage the session? Most books are very shallow in this area.

Thank you again for taking the time out to read my post and replying with some good information.

Russ
praveen kumar soni
Greenhorn

Joined: Mar 21, 2005
Posts: 13
Hello

We had a similar problem too , Well as suggested u need to use a good profiler and find the hotspot's of object creation. One thing folks forget to do is dereference the various collection objects they have created , just to take extra care u can also assign String to null (if not required later) . So make sure u r finally blocks are in place . YOu can also try increasing heap size , since this will help the garbage collector to collect objects.
 
 
subject: Memory Increasing--Time to figure out why
 
Similar Threads
Do stuffs when browser closes
Some Basic Questions to be solved!
WebSphere 4 connection pooling.
How do the connections get closed in Connection Pool
Connection Pooling size