This week's book giveaway is in the Server-Side JavaScript and NodeJS forum.
We're giving away four copies of Node.js Design Patterns: Design and implement production-grade Node.js applications using proven patterns and techniques and have Mario Casciaro & Luciano Mammino on-line!
See this thread for details.
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

PermGen error in Tomcat using Eclipse

 
Ranch Hand
Posts: 104
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi. After a few hours of usage (Tomcat v6.0.20) I am regularly getting the permGen java.lang.OutOfMemoryError and the loading of pages in the browser slows down alot. I have seen the following fix http://neevtech.com/blog/2009/06/07/apache-tomcat-outofmemory-heapspace-and-permgen-space-error/. However I start tomcat via my eclipse (sysdeo plugin) - it starts tomcat in debug mode and allows clear viewing of errors in the console, hence the reason I startup the server via this. I was just wondering whether the fix specified on that link will work when I am starting tomcat via my eclipse? thanks
 
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This can be a pain during development / debug. Here is a helpful post on the topic. Erics Agile Answers

Good luck,
Stu
 
vik ar
Ranch Hand
Posts: 104
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have added JAVA_OPTS=-XX:PermSize=64M -XX:MaxPermSize=128M as the first line in Catalina.bat as specified here https://coderanch.com/t/441850/Tomcat/Tomcat-Permgen-space#1965739. I'm not sure if the eclipse plugin uses this .bat to startup tomcat though??? This is an awful problem and after trudging around on the net for a few hours there doesnt seem to be any clear explanation of how to resolve the issue
 
vik ar
Ranch Hand
Posts: 104
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
well what I did didnt work. can someone please advise on how to resolve this issue. thanks
 
Sheriff
Posts: 67592
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:
  • Quote
  • Report post to moderator
Please be sure to post IDE questions in the IDEs forum. I have moved this post there for you, fixing up your rather Spartan title.
 
vik ar
Ranch Hand
Posts: 104
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
cheers. just wasnt sure what forum to post it in
 
Ranch Hand
Posts: 1179
Mac OS X Eclipse IDE
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Isn't there a "JVM Settings" under "Preferences->Tomcat" in Eclipse??

I think that you need to add the JVM Perm params there.

http://www.sipages.com/sysdeopage.shtml
 
vik ar
Ranch Hand
Posts: 104
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
ok i will add the following to jvm parameters

JAVA_OPTS=-XX:PermSize=64M -XX:MaxPermSize=128M

Would it be better if I increased the memory to 256 or maybe even more? I have 2gb ram pc

thanks
 
vik ar
Ranch Hand
Posts: 104
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have received the following error when I tried to start tomcat

The following is exactly what I added to windows > preferences > tomcat > Append to JVM Parameters

JAVA_OPTS="-XX:PermSize=256M -XX:MaxPermSize=256M"
 
Rene Larsen
Ranch Hand
Posts: 1179
Mac OS X Eclipse IDE
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I've just installed the sysdeo plugin, and tried it my self and it works for me.

Is this what you have added: JAVA_OPTS=-XX:PermSize=256M -XX:MaxPermSize=256M ??

It should only be these JVM params: -XX:PermSize=256M -XX:MaxPermSize=256M
 
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic