• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Memory Increasing--Time to figure out why

 
Russ Ray
Ranch Hand
Posts: 52
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 14112
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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).
 
Russell Ray
Ranch Hand
Posts: 116
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 13
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic