Follow by Email

Thursday, 10 September 2015

Jdeveloper installation folder size increasing beyond limit , Reason was hprof (Heap Profiling) files

Recently i faced a problem, i was lacking space on my C drive so  checked all directories and found that the size of Jdeveloper 12.1.3 installation folder Oracle-->Middleware  was approx 30 GB . This is not expected as Jdev. takes approx 1.5 to 2 GB space only

Then i found some java_pidXXXX.hprof file that was taking lot of space in this folder

From Docs-
What is HProf ?
HProf is a tool built into JDK for profiling the CPU and heap usage within a JVM. A Java process crash may produce an hprof file containing a heap dump of the process at the time of the failure. This is typically seen in scenarios with "java.lang.OutOfMemoryError" 

So for the time i have deleted all these files as i don't need (typically used for memory leaks analysis), these files were created due to jdeveloper  outOfMemory warning.
So final resolution is to solve outOfMemory problem of Jdeveloper -Fixing java.lang.OutOfMemory Java Heap Space error in JDeveloper

To avoid creation of these files next time do a change in jdev.config file in C:\Oracle\Middleware\Oracle_Home\jdeveloper\jdev\bin  path
In jdev.config Search for Automatically dump heap on OutOfMemoryError , this section tells about heap dump on out of memory-

From jdev.config file -
The heap dump is in HPROF binary format, and so it can be analyzed using
# any tools that can import this format. Examples are jhat, NetBeans and YourKit.
# By default the heap dump is created in a file called java_pid<pid>.hprof in the
# working directory of the VM.

to stop creating dump file comment this line in jdev.config - AddVMOption  -XX:+HeapDumpOnOutOfMemoryError

Cheers:) Happy Learning


No comments :

Post a Comment