• 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

Tomcat memory problem

 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have a problem with running a servlet on Tomcat, it keeps running out of memory in certain pages. The jsp page, using tags, displays a list of Peoples details, name address etc. This particular page that I have the most problem with crashes after me added 7-8 new people to the list and re-load the page. When I rip out most of the tags, the page loads fine. I can no see what could possibly cause the problem as the tags on this page use the exact same structure as other tags on other pages, which work fine. Anyone help would be greatly apprechiated. Thank you.
 
"The Hood"
Posts: 8521
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Moving to the Tomcat forum.
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Given that your objects in use sound pretty small, I'm guessing that you are going into some sort of loop that just keeps adding to a String or collection.
If this was my problem I would drop System.out.println statements into any loops that are operating to see how many times they cycle.
 
Ranch Hand
Posts: 3695
IntelliJ IDE Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
> When I rip out most of the tags, the page loads fine

> the tags on this page use ... as other tags on other pages

So it's only these particular tags on this particular page that cause a problem? If they are your tags, perhaps this is where the leak is coming from. And even if they aren't your tags, you might have discovered a problem with someone else's. If you're actually throwing a java.lang.OutOfMemory Error, then does the stack trace offer any clues?
 
Zsuzsa Pocsai
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Unfortunately the stack trace does not help at all. What happens is that it takes about seven updates to the screen for it to crash. Slowling the used memory is going up and eventually it runs out of memory, when it is trying to refresh the screen after me adding new data to it. I have absolutely no idea what coulc cause this. All my other screen are working with the same pricipal, same structure to the tags etc and they all work fine.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic