This week's book giveaway is in the Agile and Other Processes forum.
We're giving away four copies of Real-World Software Development: A Project-Driven Guide to Fundamentals in Java and have Dr. Raoul-Gabriel Urma & Richard Warburton on-line!
See this thread for details.
Win a flower (🌹) or copy of Real-World Software Development: A Project-Driven Guide to Fundamentals in Java (📚) this week in the Agile and Other Processes forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Bear Bibeault
  • Liutauras Vilda
  • Devaka Cooray
Sheriffs:
  • Knute Snortum
  • Junilu Lacar
  • Henry Wong
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
  • Tim Holloway
Bartenders:
  • salvin francis
  • Frits Walraven
  • Piet Souris

Java heap out of memory problems

 
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I make a spider program, but it runs out of memory after ~200 websites.

after that it crashes.. or becomes so slow its useless.

The problem is in this Spider class , that cant be garbage collected (But I dont see any reason why not)

These profilers i have seen show you that memory is allocated and cant be garbage collected , but not where ? Can anyone give suggestions what can be wrong with this class or tell how they fix memory problems?

peter





It must have something to do with the inner classes and processURL since i replaced only this code Swing parser with htmlparser.

I dont expect anyone to exactly say this is wrong or that, but maybe some tools and suggestions how to solve would be very welcome.

thanks>

[ May 13, 2006: Message edited by: peter velth. ]
[ May 13, 2006: Message edited by: peter velth ]
 
pioneer
Posts: 1923
Scala Postgres Database Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Suggestion 1: use code-tags and indentation to make the code readable.
 
author and iconoclast
Posts: 24203
43
Mac OS X Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Welcome to JavaRanch!

Suggestion two is to comply with our policy on display names. You'll find that no one takes you seriously with a name like "pet vet", and you're unlikely to get your question answered. JavaRanch requires your display name to be a real (sounding) first and last name. You need to change your display name here. Thank you for your immediate attention.
 
peter velth
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ok, i changed it. 'pet vet' was just my name shortened.
 
Too many men are afraid of being fools - Henry Ford. Foolish tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!