Win a copy of Node.js Design Patterns: Design and implement production-grade Node.js applications using proven patterns and techniques this week in the Server-Side JavaScript and NodeJS forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

Increasing the PermGen Space

 
Ranch Hand
Posts: 99
Eclipse IDE
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi

Im currently doing dynamic memory analysis, for our eclipse based application using jprobe.After starting the eclipse application and jprobe, when I try to profile the eclipse application by integerating it with jprobe, the eclipse application gets closed abruptly causing a Fatal error. A fatal error log file is generated. In the Fatal error log file, I could see that the PermGen space seems to be full. Below is a sample Heap summary which I got in the log file


I tried to increase the permGen space, using the command -XX:MaxPermSize=512m. But that doesnt seem to work. I would like to know how to increase the PermGen size via command prompt. I would like to know if I have to go to the java location in my computer and execute the above command or should I increase the PermGen space specifically for the eclipse application or Jprobe ? Please advise.

Any help on this is much appreciated.
 
Java Cowboy
Posts: 16084
88
Android Scala IntelliJ IDE Spring Java
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Varshini Priya wrote:I tried to increase the permGen space, using the command -XX:MaxPermSize=512m. But that doesnt seem to work.


What exactly did you do? -XX:MaxPermSize=512m isn't a command that you type somewhere, it's an option that you specify on the command line when you run your Java program.

Varshini Priya wrote:I would like to know how to increase the PermGen size via command prompt. I would like to know if I have to go to the java location in my computer and execute the above command or should I increase the PermGen space specifically for the eclipse application or Jprobe ?


There's no way to run a command once to permanently change the max. perm gen size. You add this option on the command line when you run your program. For example:

java -XX:MaxPermSize=512m -cp C:\MyProject\classes com.mypackage.MyProgram

You don't want to change the max. perm size for Eclipse or JProbe, but for your own application.
 
Varshini Priya
Ranch Hand
Posts: 99
Eclipse IDE
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Jasper,

Thanks for the detailed response. I have two queries


1. Can you please let me know how to increase the max Perm gen size without knowing the max perm Gen size being used by the running application. Is there any command that I need to execute to see what is the current max Perm Gen size that is actually used by my application. Before inserting a new value ?

2. As I specified earlier, the application which Im trying to run is an eclipse base application and I tried to include the below value in the myapplication.INI file included " --launcher.XXMaxPermSize = 512m" . But it doesn't seem to help much. Since my application hangs.. and gets closed abruptly .

Can you please let me know the way as how to execute my application via command prompt after by changing the max perm gen size.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic