• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Out of memory problem !

 
Ranch Hand
Posts: 81
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 171
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 130
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic