• 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 control
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Memory control


  • Subject: Re: Memory control
  • From: Chuck Hill <email@hidden>
  • Date: Mon, 14 Mar 2011 11:13:28 -0700

Hi,

On Mar 14, 2011, at 1:36 AM, Gennady Kushnir wrote:

> Hello again everybody.
> I still hope somebody would answer.
> I'va made GC logging with -XX:+PrintGCDetails and I see some
> interesting things happening.
> It seems like some uncollectable garbage is being accumulated in memory.
> Within the first hour heap usage goes up 35M and then within next 6
> hours falls back to that number after rare fullGC acts.
> After 8 hours that lower limit goes up to 40M, after 20 hours - to 45M
> and fullGC acts happen significantly more often.
> After 30 hours heap usage would not fall lower 50M and after 35 hours
> almost every GC is fullGC. Since 60 hour lowest heap usage is 55M.
> Finally at about 95 hours I get OutOfMemory error as the heap is
> limited by default to 64M.

64M seems small to me for a Java app.


> So my question is - what should I do now?
> Is it expected behavior for large WO application?

Using 64M+ of memory is, the increasing heap size is not.


> Should I simply rise max heap limit to find memory amount that would be enough?

I doubt that would work.

> Should I schedule WOMonitor to restart the App every night?

That is the cheap option (requires no developer time).

> Or such behavior should be considered as my error somewhere in code?
> So where should I look for memory leaks?

You mentioned before exceptions, that is where I would start.  Also check that your session sleep(), awake(), and terminate() can never throw an exception.  If you are getting deadlocked sessions, then the session, page cache, and related EOs will never get garbage collected.

Beyond that, I would try a heap analyzer to see what the objects are that do not get collected.


Chuck



> 2011/3/3 Gennady Kushnir <email@hidden>:
>> Hello All!
>> I would raise this topic again. Thanks for all tips you have me.
>> Jprofiler is too commercial for me unfortunately. And VisualVM failed
>> to run on my deployment system (Xserve G4).
>> In fact even when run on my dev system, I could not actually figure
>> out how it could help me :(
>> I feel sad about I loosely know many aspects in Java technology. Could
>> you give me some links where to read about such things as "Eden",
>> "young generation" and "survivors" - I did not get these terms.
>>
>> And about those ec's that don't get garbage collected. After
>> eliminating all references to EO's outside components I still could
>> not get rid of that issue.
>> When debugging I've finally noticed inside a WOSession object an
>> NSMutableDictionary called _contextRecords, which holds hard
>> referenced on ALL previously used components. Even though I have
>> reduced pageCacheSize to 5 in an Application constructor.
>> And those components hold references to those ec's so they can't get
>> garbage collected...
>> Sad...
>>
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Webobjects-dev mailing list      (email@hidden)
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden

--
Chuck Hill             Senior Consultant / VP Development

Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems.
http://www.global-village.net/products/practical_webobjects







Attachment: smime.p7s
Description: S/MIME cryptographic signature

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Memory control
      • From: Gennady Kushnir <email@hidden>
References: 
 >Re: Memory control (From: Gennady Kushnir <email@hidden>)
 >Re: Memory control (From: Gennady Kushnir <email@hidden>)

  • Prev by Date: Page navigation and Persistence
  • Next by Date: Re: FTP ?
  • Previous by thread: Re: Memory control
  • Next by thread: Re: Memory control
  • Index(es):
    • Date
    • Thread