wood burning stoves 2.0*
The moose likes JSP and the fly likes Out Of Memory Error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "Out Of Memory Error" Watch "Out Of Memory Error" New topic
Author

Out Of Memory Error

Ram kanana
Ranch Hand

Joined: Apr 13, 2006
Posts: 34
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

Joined: Nov 20, 2006
Posts: 59
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


Ram...
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

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?


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
Jeroen T Wenting
Ranch Hand

Joined: Apr 21, 2006
Posts: 1847
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.


42
Ram kanana
Ranch Hand

Joined: Apr 13, 2006
Posts: 34
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

Joined: Aug 15, 2004
Posts: 2874
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

Joined: Aug 15, 2004
Posts: 2874
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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Out Of Memory Error
 
Similar Threads
How many queues can be configurred in jboss-3.2.3
Ant : Error occurred during initialization of VM
Cost factor of Cloud Computing
Jboss starting heap issue
In-process Servlet Container - Same address space