This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Out Of Memory Error

 
Ram kanana
Ranch Hand
Posts: 34
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
On my site i have got an error "java.lang.OutOfMemoryError: PermGen space" how i resolve this problem.

Is this the correct way can i contact hosting server and ask to increase heap space memory or which one is best solution for this memory type error.
 
Rama Krishna Ghanta
Ranch Hand
Posts: 59
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is absolutely an error related to the servers performance and i hope the only way to solve this is to increase the heap size.

Regards,
Rama Krishna Ghanta
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Rama Krishna Ghanta:
This is absolutely an error related to the servers performance and i hope the only way to solve this is to increase the heap size.

Regards,
Rama Krishna Ghanta


This is not correct.
The heap space and permGen space are separate.

To increase your PermGen space use the -XX:MaxPermSize option.
Example:


What container are you using?
 
Jeroen T Wenting
Ranch Hand
Posts: 1847
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
From research after getting the same error consistently in Eclipse 3.2 some time back it seems that excessive use of String.intern() can cause this condition.
I don't know of a servlet container or JSP compiler that's guilty of that (which doesn't mean they don't exist, there must be many I've never even heard of), but if you use String.intern() in your own web application you may want to think hard about whether you really need to use it.
 
Ram kanana
Ranch Hand
Posts: 34
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What container are you using?


I am using Tomcat Server and may i know what is the difference between PerGmen and Heap Space Error
 
Adeel Ansari
Ranch Hand
Posts: 2874
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Ram kanana:
I am using Tomcat Server and may i know what is the difference between PerGmen and Heap Space Error


I believe, PermGen is a JVM's garbage collector managed generation and it is not allocated by your java application, whereas latter is allocated by your application.

This might give you the overview.
 
Adeel Ansari
Ranch Hand
Posts: 2874
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Jeroen T Wenting:
From research after getting the same error consistently in Eclipse 3.2 some time back it seems that excessive use of String.intern() can cause this condition.


I have also came across the similar reading that it happens when unreferenced/orphan interned string are not garbage collected.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic