This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Tomcat and the fly likes Heap Space Error in Tomcat 5.0 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Heap Space Error in Tomcat 5.0" Watch "Heap Space Error in Tomcat 5.0" New topic
Author

Heap Space Error in Tomcat 5.0

mallika mallikaa
Greenhorn

Joined: Nov 01, 2011
Posts: 6
While uploading an xml file of size 9mb we are getting the following error.

java.lang.OutOfMemoryError java heap space.We are using Tomcat 5.0 and increased the heap size to 256 MB but still we are facing the error.

We have properly closed the result set,connection and prepared statement objects also.

Please suggest.
Akhilesh Trivedi
Ranch Hand

Joined: Jun 22, 2005
Posts: 1526
I have had similar error in past. Sometimes we deleted some files(wars) from the server, sometimes from outside of it. See if that may be the case.


Keep Smiling Always — My life is smoother when running silent. -paul
[FAQs] [Certification Guides] [The Linux Documentation Project]
Rojan punn
Greenhorn

Joined: Nov 29, 2011
Posts: 17

Hi,

What is the server capacity?
Out of memory error suggest jvm cant allocate any more heap space .
Try some of the Memory analyzer tools(VisualVm,J console etc.)
256 looks to me like a very small amount.But it depends on the size of application and real time users.
Do you have any tool to track memory leak?and prints the memory leak on the trace file?
It is very good to have a java class which can keep track of opened resultset ,connection and gives an error or warning if the objects are not closed properly.
If its a problem with unclosed object the same problem haoppens at some stage even if you allocate 512 MB memory.

RashMin Gadhavi
Greenhorn

Joined: Feb 12, 2008
Posts: 15
No one could get the solution for this? If yes let me know too, as I am facing this issue in my production environment!
 
Consider Paul's rocket mass heater.
 
subject: Heap Space Error in Tomcat 5.0