0

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.

  • If I understand your question correctly, you need to increase the amount of memory allocated to avoid PerGenSpaceError. Have you done that? – Raf Nov 17 '15 at 16:42
  • Well the problem is that I increased the memory allocated to all memory available on the computer and when I give it to analyze a huge file for example of 4 terabytes it will give me PerGenSpaceError. – Vlad Verdes Nov 18 '15 at 10:08
  • Just to be sure - what memory did you increase? Heap Size? Or Perm Gen ? – matt freake Nov 19 '15 at 09:51

1 Answers1

1

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.

Community
  • 1
  • 1
Raf
  • 7,505
  • 1
  • 42
  • 59
  • Well the problem is that I increased the memory allocated to all memory available on the computer and when I give it to analyze a huge file for example of 4 terabytes it will give me PerGenSpaceError. – Vlad Verdes Nov 18 '15 at 10:11
  • Your operating system and various other running processes also make use of the available memory hence, the memory is divided across the operating system, processes and your application. I recommend you run Java Visual VM to find out how much memory is consumed when by your application when you work on your big dataset? and how much memory is available for use? If less memory is available for use then memory upgrade is essential, if more is available but application don't use it then you need to tweak configs of your application to use more memory. Try Java Visual VM you will have an idea. – Raf Nov 18 '15 at 11:36