Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Agile forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Out of memory problem !

 
Dharmin Desai
Ranch Hand
Posts: 81
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
dear friends,
My JSP when executes give me " Servlet Exception " under which it is showing " java.lang.OutofMemoryError " as a root cause.
I m using tomcat as my container !
Can anybody help ?
- Dharmin
 
Andy Bowes
Ranch Hand
Posts: 171
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have only really seen this error when there is something like an infinite loop which is results in the creation of a large number of object instances.
I'd have a good look at the JSP code, suggest that you post it's contents here if it's not too large.
If it is large then try commenting out various bits of the JSP to see which sections make it fail.
HTH
Andy Bowes
 
Joe Broderick
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
what kind of pc and how much memory do you have? i have never seen this error, and i do most of my coding on a pII266 with 64 megs, although i just added a litte more ram to 96 megs.
 
Ken Januski
Ranch Hand
Posts: 130
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Upping the initial heap size and maximum heap size for Tomcat can give you more memory than the default, whose numbers I forget.
I changed them when I ran into occasional out of memory errors. I haven't run into them again but since they only occurred once a month or so and since I only made the change a month or so ago it's a little too early to tell if it worked.
But if the jsp throws out of memory errors every time it's run then I'd guess there's something wrong in the code, as others have sugggested.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic