aspose file tools*
The moose likes Performance and the fly likes java.lang.OutOfMemoryError: PermGen space Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Performance
Reply locked New topic
Author

java.lang.OutOfMemoryError: PermGen space

Sam Venkata
Ranch Hand

Joined: Mar 06, 2006
Posts: 68
Hi guys,
I have this memory exception( java.lang.OutOfMemoryError: PermGen space).
I know I need to increase the memory size by altering the JAVA_OPT's
-XX ermSize=128m -XX:MaxPermSize=196m parameters from the command line, but I use Tomcat 6.0 as a windows service, I want the changes to occur automatically instead of using the command prompt. Can somebody help me with this.
Thanks,
Samanth.
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12769
    
    5
I want the changes to occur automatically instead of using the command prompt.


There is no way to change the any memory setting on the fly, it has to be done on starting the JVM. Exactly how to do this depends on how you are running Tomcat, I don't recall how to do it for Tomcat as a service, ask in the Tomcat forum.

Bill
Sam Venkata
Ranch Hand

Joined: Mar 06, 2006
Posts: 68
Thanks Bill,

I know that it could be done by setting
++JvmOptions="-XX:MaxPermSize=128m", but I was not sure where to do it whether in CATALINA_OPTS or JAVA_OPTS parameters in the catalina.bat and also I am not aware of how to it.
Please let me know if you know something about it.


Samanth.
Sam Venkata
Ranch Hand

Joined: Mar 06, 2006
Posts: 68
Bill,
I got it working... just set javaoptions to -XX:MaxPermSize=128m...

Thanks,
Samanth.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60975
    
  65

Please do not cross-post the same question in multiple forums. It wastes people's time when multiple redundant conversations take place.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: java.lang.OutOfMemoryError: PermGen space