forrest-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thorsten Scherler <thorsten.scherler....@juntadeandalucia.es>
Subject RE: Is forrest heaps size limited?
Date Wed, 19 Sep 2007 09:21:38 GMT
On Wed, 2007-09-19 at 15:23 +0800, Gav... wrote:
> <quote who="Thorsten Scherler">
> > On Tue, 2007-09-18 at 20:07 +0800, Gav.... wrote:
> >> Hi Thorsten.
> >>
> >> > -----Original Message-----
> >> > From: Thorsten Scherler
> >> [mailto:thorsten.scherler.ext@juntadeandalucia.es]
> >> > Sent: Tuesday, 18 September 2007 3:45 PM
> >> > To: user@forrest.apache.org
> >> > Subject: Is forrest heaps size limited?
> >> >
> >> > Hi all,
> >> >
> >> > I am trying to set forrest heaps size up, but with limited suggest.
> >> >
> >> > forrest.jvmargs=--Xms256M -Xmx1024M -Djava.awt.headless=true
> >> >
> >> > is failing with:
> >> >
> >> > Error occurred during initialization of VM
> >> > Incompatible initial and maximum heap sizes specified
> >>
> >> This is because you haven't increased forrest.maxmemory to suit.
> >>
> >> Try increasing forrest.maxmemory to 256m then try your above 256/1024
> >> should work fine.
> >>
> >
> > Hmm, cheers.
> >
> > It is a bit confusing to define 2 different properties for that.
> > forrest.jvmargs=-Xms256M
> > forrest.maxmemory=1024M
> >
> > salu2
> 
> Sorry, thats not what I meant.
> 
> Your original line is ok :
> 
> forrest.jvmargs= -Xms256M -Xmx1024M -Djava.awt.headless=true
> 
> but the forrest.maxmemory is related and defaults to 64M
> You need to increase this to 256M for your jvmargs to work.
> 
> forrest.maxmemory=256M
> 
> is sufficient for your jvmargs to function correctly.
> They are two seperate variables for Java but related.
> 
> Can't explain it better than that other I tried it and works
> fine.
> 

Thanks for taking the time to explain. 

To clarify, we have in site.xml:
<java classname="org.apache.cocoon.Main"
          fork="true"
          dir="${forrest.core.webapp}"  
          maxmemory="${forrest.maxmemory}"
          failonerror="false"
          resultproperty="buildResult">

Where forrest.maxmemory is equivalent to -Xmx (maximum heaps size) in
above code snippet. However -Xms is the minimum heaps size (which is
critical in my use case).

You are totally right that if I do not raise the forrest.maxmemory to
equal or greater size of -Xms, I then define the minimum higher then the
max and get the error, since -Xms256M > 64M (${forrest.maxmemory}).

So if I want to define the max AND the min in forrest I need to set both
properties.

So I would need something like:
forrest.jvmargs= -Xms256M -Xmx1024M -Djava.awt.headless=true
forrest.maxmemory=1024M

Where forrest starts with a minimum of 256M and a maximum of 1024M, but
since we already limit the maxmemory via the ant task I as well can use 

forrest.jvmargs= -Xms256M -Djava.awt.headless=true
forrest.maxmemory=1024M

which has the same effect, since the jvmarg -Xmx is getting ignored.

salu2

> Gav...
> 
> >
> >> Gav...
> >>
> >> >
> >> > BUILD FAILED
> >> > /home/thorsten/src/apache/forrest/trunk/main/forrest.build.xml:433:
> >> Java
> >> > returned: 1
> >> >
> >> >
> >> > But with
> >> > forrest.jvmargs=-Xms64M -Xmx256M -Djava.awt.headless=true
> >> >
> >> > It is working. Seems like the ms cannot do more then 100M since 128M
> >> is
> >> > failing as well.
> >> >
> >> >
> >> > Somebody an idea what the problem can be?
> >> >
> >> > salu2
> >> > --
> >> > Thorsten Scherler
> >> thorsten.at.apache.org
> >> > Open Source Java                      consulting, training and
> >> solutions
> >> >
> >> >
> >> >
> >> > --
> >> > No virus found in this incoming message.
> >> > Checked by AVG Free Edition.
> >> > Version: 7.5.487 / Virus Database: 269.13.22 - Release Date: 9/17/2007
> >> > 12:00 AM
> > --
> > Thorsten Scherler                                 thorsten.at.apache.org
> > Open Source Java                      consulting, training and solutions
> >
> >
> 
> 
-- 
Thorsten Scherler                                 thorsten.at.apache.org
Open Source Java                      consulting, training and solutions


Mime
View raw message