This blog was written by Piotr Findeisen, HP Diagnostics Sr. Software Engineer
Java technology is widely used today for server side programming. One of the most prominent issues affecting deployed Java applications is the so called Java memory leak. Because Java offers automatic memory management, Java memory leaks are actually only unintentional object retention cases. However, the former term is universally used and recognized, so we also use it here.
The most important effects of the Java memory leak for long running applications are as follows:
This is a serious problem for business critical applications, as it wastes computing (and human) resources, causes unpredictable outages in the IT environment and can lead to lost business.
During this 3 part blog series we will discuss the following topics:
Understanding Java Memory Leaks
Many managers and even some non-Java developers think that Java automatic memory management (GC) prevents the memory leaks from occurring. Without going into technicalities, let’s just say that this is a very incorrect expectation.
The nature of the problem is that the affected application, due to some faulty coding, holds references to more and more objects over time, so that the GC cannot reclaim the memory occupied by the objects. This results in the heap growing larger over time, which eventually leads to aforementioned crash.
Neither attempts to increase the heap size, nor enforcement of additional GC cycles fix the problem. They may just delay the deadly effect of the memory leak at the price of wasted resources.
The Challenge
The difficulties in diagnosing and fixing Java memory leaks stem from the following factors:
The analysis of the problem leads to the following requirements for a tool for diagnosing Java memory leaks in production environment:
The next blog in this 3 part series will go over some of the traditional troubleshooting approaches for Java Memory Leaks.
This blog was written by Piotr Findeisen, HP Diagnostics Sr. Software Engineer