Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Heap Space Error in Tomcat 5.0

 
mallika mallikaa
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1599
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Rojan punn
Greenhorn
Posts: 17
Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No one could get the solution for this? If yes let me know too, as I am facing this issue in my production environment!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic