Vlad Verdes
Vlad Verdes

Reputation: 11

PermGenSpace Error on Weblogic 12c

My problem is that I have a Weblogic 12c and when I try to make an analysis of a data on my site, the data is so big that it give me PermGenSpaceError. Well my question is what can I do to fix it because it happen just when I analyze big data which have more than 8060576 total memory because that is all my memory RAM from server and how I can do. If you can give me an tutorial or video I will be very graceful because I searched over a day on this problem and I am still without an answer.

Thank you very much, Vlad.

Upvotes: 0

Views: 879

Answers (1)

Raf
Raf

Reputation: 7649

A bit of insight on how things work when you run a java-based application. Your application is compiled (set classes, etc) and they are run by JVM that stands for Java virtual machine.

Java virtual machine memory is composed of regions. The stack region where variables and methods are stored and the heap space region where everything else is stored. The Java heap space is once again structured in different regions called generations and where an object is stored depends on how long the object lives.

Now you get an idea where the PermGenSpace (Permanent Generation Space) comes from.

In your case, you need to increase the size of the PermGenSpace memory in order to allow your application to be able to process huge amount of data. There are loads of answers in stackoverflow that can teach you how to do that, listed below:

  1. Dealing with "java.lang.OutOfMemoryError: PermGen space" error
  2. Weblogic increase memory
  3. facing perm gen space error in weblogic
  4. Oracle help centre - tunning Java Virtual Machine
  5. WebLogic PermnGenSpace Settings
  6. More on PermnGen and what is causing it here

There are many more external link that can help you on how to setup PermGenSpace memory.

Before I conclude, I would like to mention another great tool that you can use to find out how your weblogic instance behaves. The Java Visual VM allows you to monitor how your application makes use of Java Heap Space, processor, network, etc resources. The Java Visual VM once installed, detects the running java-based application (local - you can also setup Java Visual VM to do monitor remote servers using RMI) and shows you details of the VM, the existing amount of memory allocated for Java heap space, the amount that application uses, the maximum memory of the computer, etc.

I had issues with an image management app when analysing image files (6 GB) in size. The problem I found was basically the image management app was not garbage collecting properly and Java Visual VM helped me spot the issue.

So I recommend, download and install Java Visual VM, run your application and then see how your memory and other resources are used. If the Java heap space is indeed running out of memory then you can increase the size using above links and then re-run the application and monitor its performance using Java Visual VM.

Upvotes: 1

Related Questions