Regarding Java Garbage Collection ? Urgent

Posted on 2003-02-21
Medium Priority
Last Modified: 2010-03-31
We are using weblogic server(6.1) jdk 1.3.1 for our web application. Java Garbage Collector is not cleaning unused memory even the memory usage is more than 90%. we need to do "force to garbage collection" for every day. The memory usage goes down once i do "force to garbage collection". Really we could not find the problem. Is it the problem for memory leak. if it's memory leak then how it goes down once i do "force to garbage collection". I will appreciate if you could tell me the some guide line.

Note : outofmemoryexception error is coming if we didn't do the "force to garbage collection".

Question by:makks
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
LVL 86

Accepted Solution

CEHJ earned 100 total points
ID: 7996491
I can't give you a quick fix. Some of the other experts may be able to tell you where to find the problem using profilers - i have no experience of these.

But i can offer some general preliminary comments. It's certainly a misconception that memory problems are always going to be prevented by garbage collection. GC is dependent on thread scheduling, and if there are threads that are getting scheduled a lot and/or are high priority, GC is going to get overwhelmed in certain cases. So allocating memory in loops, recursion and the like can cause problems if they are allowed to proceed without compensatory code.


Assisted Solution

alzoid69 earned 100 total points
ID: 8010851
THere is a finalize() method that makes your objects eligble for garbage collection.  Some times Object = null; doesn't work.  You should check out java.sun.com  They have alot of articles on the behaviour of the garbage collector.  CHeck the forums there too.   System.gc() will call the garbage collector.  Like CEHJ said since the garbage collector is a low priority thread calling System.gc() or finilize() does not garuntee the garbage collector will run.  Check out java.sun.com they have the expert advice you need.

Expert Comment

ID: 9059155
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
Post your closing recommendations!  No comment means you don't care.

Expert Comment

ID: 9582250
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:
Split points between CEHJ and alzoid69

Please leave any comments here within the next seven days.


Thomas Boshell
EE Cleanup Volunteer

Expert Comment

ID: 9602009
We are running into the same problem with our application, did Mahesh find out what the issue was?

Featured Post

Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Java had always been an easily readable and understandable language.  Some relatively recent changes in the language seem to be changing this pretty fast, and anyone that had not seen any Java code for the last 5 years will possibly have issues unde…
Introduction This article is the last of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers our test design approach and then goes through a simple test case example, how …
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question