GeeCON Prague 2014*
The moose likes IDEs, Version Control and other tools and the fly likes PermGen error in Tomcat using Eclipse Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "PermGen error in Tomcat using Eclipse" Watch "PermGen error in Tomcat using Eclipse" New topic
Author

PermGen error in Tomcat using Eclipse

vik ar
Ranch Hand

Joined: Jul 31, 2009
Posts: 104
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

Joined: Feb 27, 2009
Posts: 35
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

Joined: Jul 31, 2009
Posts: 104
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

Joined: Jul 31, 2009
Posts: 104
well what I did didnt work. can someone please advise on how to resolve this issue. thanks
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61309
    
  66

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.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
vik ar
Ranch Hand

Joined: Jul 31, 2009
Posts: 104
cheers. just wasnt sure what forum to post it in
Rene Larsen
Ranch Hand

Joined: Oct 12, 2001
Posts: 1179

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


Regards, Rene Larsen
Dropbox Invite
vik ar
Ranch Hand

Joined: Jul 31, 2009
Posts: 104
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

Joined: Jul 31, 2009
Posts: 104
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

Joined: Oct 12, 2001
Posts: 1179

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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: PermGen error in Tomcat using Eclipse