• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Memory leaks
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Memory leaks


  • Subject: Re: Memory leaks
  • From: Art Isbell <email@hidden>
  • Date: Tue, 19 Aug 2003 15:54:41 -1000

On Tuesday, August 19, 2003, at 03:27  PM, Robert Head wrote:

I'm working on a mission critical project to import records into our DB, but finding that my WebObjects apps are getting (exponentially?) slower and flakier with the size of the DB. We're only talking about 150k records (33.5 MB) so far, distributed primarily across 5 or 6 tables. The query times are still great outside of WebObjects (for example, via phpmyadmin).

This sounds like the behavior of older EOF versions that held on to EO snapshots for the life of the WO process such that if a great variety of objects was being fetched, a higher and higher percentage of the database records were being cached by the WO process causing process memory to increase during the life of the process. This looked like a memory leak, but references to these snapshots still existed, so it wasn't a traditional memory leak.


This problem was eliminated by the implementation of snapshot reference counting. As soon as the reference count of a snapshot dropped to zero (no more references from objects in editing contexts), the snapshot was available for garbage collection.

Even better memory management was introduced in WO 5.2. Objects in editing contexts are available for garbage collection if no external reference exists.

So if you're maintaining external references to lots of fetched objects, these objects and their snapshots won't be garbage-collected and memory usage will increase. This could be happening if session time outs are very long such that many sessions continue to exist long after the last request has been made.

If this were happening to me, I would check my code to ensure that I'm destroying all unnecessary references to EO's as soon as possible. If that didn't solve the problem, I'd consider licensing something like Borland's OptimizeIt which includes automatic memory leak detection.

Aloha,
Art
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.

References: 
 >Memory leaks (From: Robert Head <email@hidden>)

  • Prev by Date: Memory leaks
  • Next by Date: Re: Mapping multiple EOs to one table
  • Previous by thread: Memory leaks
  • Next by thread: how to generate multiple aliases in a SELECT
  • Index(es):
    • Date
    • Thread