Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

PermGen error in Tomcat using Eclipse

 
vik ar
Ranch Hand
Posts: 104
  • Mark post as helpful
  • send pies
  • 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
 
Stu Quinn
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • 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
  • 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 http://www.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
  • Quote
  • Report post to moderator
well what I did didnt work. can someone please advise on how to resolve this issue. thanks
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64971
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • 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
  • Quote
  • Report post to moderator
cheers. just wasnt sure what forum to post it in
 
Rene Larsen
Ranch Hand
Posts: 1179
Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • 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
  • 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
  • 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
Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • 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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic