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
  • Devaka Cooray
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Jeanne Boyarsky
  • Tim Cooke
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Mikalai Zaikin
  • Carey Brown
Bartenders:

java.lang.OutOfMemoryError: PermGen space

 
Ranch Hand
Posts: 68
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
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.
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator

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
Posts: 68
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
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
Posts: 68
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
Bill,
I got it working... just set javaoptions to -XX:MaxPermSize=128m...

Thanks,
Samanth.
 
Sheriff
Posts: 67735
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
Please do not cross-post the same question in multiple forums. It wastes people's time when multiple redundant conversations take place.
 
Not so fast naughty spawn! I want you to know about
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
    Bookmark Topic Watch Topic
  • New Topic