• 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: Thu, 17 Mar 2011 07:59:35 -0700

On Mar 17, 2011, at 2:08 AM, Gennady Kushnir wrote:

>> Hi,
>
>>> 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.
> I did not do any memory regulations myself. It is just default on my
> absolutely standard deployment system for WO (Xserve G4 , 2GB, MacOS X
> 10.5, Java 1.5.0_24)
>
> I found this 64M doing
> ps ax | grep "java"
>
> It lists all WO apps like this:
> /usr/bin/java -XX:NewSize=2m -Xmx64m -Xms32m -DWORootDirectory=/System ...

If you look at the entire line, you will often see these set multiple times with different values.  The last one is what is used.


Chuck

>
> So as I understand "-Xmx64m" - that is maximum heap size.
> Actual memory usage for whole JVM is about 300M.
>
>>> 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.
> What are other means to increase memory used?
>
>>> 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.
>
> Most exceptions I get now are cased by "java.lang.OutOfMemoryError:
> Java heap space"
> So that is what I am trying to get rid of.
> I get any other exceptions not more often than once a month whereas
> OutOfMemoryError comes nearly every 5th day =(
>
>>  Also check that your session sleep(), awake(), and terminate() can never throw an exception.
> Would I see such exceptions in log if they happen? I did not see any yet.
>
>> Beyond that, I would try a heap analyzer to see what the objects are that do not get collected.
> What is "heap analyzer" ? And where can I get it?
>
> Gennady

--
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>)
 >Re: Memory control (From: Chuck Hill <email@hidden>)
 >Re: Memory control (From: Gennady Kushnir <email@hidden>)

  • Prev by Date: Re: First Time Database Migration fail
  • Next by Date: Ajax / DirectActions and performance issues
  • Previous by thread: Re: Memory control
  • Next by thread: Re: Memory control
  • Index(es):
    • Date
    • Thread