grails out of memory

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

grails out of memory

adwin grails
Hi,

I am still doing development and just move to 1.1 and I got this Out
of memory (I have disable auto compile from the run-app as FAQ
recommend, -Ddisable.auto.recompile=true)

here is the error

Running Grails application..
2009-03-31 08:38:28,062 [main] ERROR
commons.DefaultGrailsControllerClass  - The allowedMethods property in
AuditLogEventController should be declared static.  The non static
version is supported for
now but has been deprecated and may not work in future versions of Grails.
2009-03-31 08:39:18,984 [main] ERROR context.ContextLoader  - Context
initialization failed
org.springframework.beans.factory.BeanCreationException: Error
creating bean with name 'pluginManager' defined in ServletContext
resource [/WEB-INF/applicationContext.xml]: Invocation of init method
f
ailed; nested exception is java.lang.RuntimeException: Unable to
locate constructor with Class parameter for class
org.codehaus.groovy.grails.commons.DefaultGrailsControllerClass
        at java.security.AccessController.doPrivileged(Native Method)
        at grails.web.container.EmbeddableServer$start.call(Unknown Source)
        at _GrailsRun_groovy$_run_closure5_closure11.doCall(_GrailsRun_groovy:145)
        at _GrailsRun_groovy$_run_closure5_closure11.doCall(_GrailsRun_groovy)
        at _GrailsSettings_groovy$_run_closure10.doCall(_GrailsSettings_groovy:269)
        at _GrailsRun_groovy$_run_closure5.doCall(_GrailsRun_groovy:137)
        at _GrailsRun_groovy.runInline(_GrailsRun_groovy:104)
        at _GrailsRun_groovy.this$4$runInline(_GrailsRun_groovy)
        at _GrailsRun_groovy$_run_closure1.doCall(_GrailsRun_groovy:58)
        at RunApp$_run_closure1.doCall(RunApp.groovy:33)
        at gant.Gant$_dispatch_closure4.doCall(Gant.groovy:324)
        at gant.Gant$_dispatch_closure6.doCall(Gant.groovy:334)
        at gant.Gant$_dispatch_closure6.doCall(Gant.groovy)
        at gant.Gant.withBuildListeners(Gant.groovy:344)
        at gant.Gant.this$2$withBuildListeners(Gant.groovy)
        at gant.Gant$this$2$withBuildListeners.callCurrent(Unknown Source)
        at gant.Gant.dispatch(Gant.groovy:334)
        at gant.Gant.this$2$dispatch(Gant.groovy)
        at gant.Gant.invokeMethod(Gant.groovy)
        at gant.Gant.processTargets(Gant.groovy:495)
        at gant.Gant.processTargets(Gant.groovy:480)
Caused by: java.lang.RuntimeException: Unable to locate constructor
with Class parameter for class
org.codehaus.groovy.grails.commons.DefaultGrailsControllerClass
        ... 21 more
Caused by: java.lang.reflect.InvocationTargetException
        ... 21 more
Caused by: org.codehaus.groovy.grails.exceptions.NewInstanceCreationException:
Could not create a new instance of class [LabourTimeCardController]!
        ... 21 more
Caused by: java.lang.OutOfMemoryError: Java heap space
        at java.util.Arrays.copyOfRange(Arrays.java:3209)
        at java.lang.String.<init>(String.java:216)
        at java.lang.StringBuffer.toString(StringBuffer.java:585)
        at LabourTimeCardController$_closure14.<init>(LabourTimeCardController.groovy)
        at LabourTimeCardController.<init>(LabourTimeCardController.groovy:11)
2009-03-31 08:39:18,984 [main] ERROR mortbay.log  - Failed startup of
context org.mortbay.jetty.webapp.WebAppContext@881278{/bmi,H:\project\bmi\bmi/web-app}
org.springframework.beans.factory.BeanCreationException: Error
creating bean with name 'pluginManager' defined in ServletContext
resource [/WEB-INF/applicationContext.xml]: Invocation of init method
f
ailed; nested exception is java.lang.RuntimeException: Unable to
locate constructor with Class parameter for class
org.codehaus.groovy.grails.commons.DefaultGrailsControllerClass
        at java.security.AccessController.doPrivileged(Native Method)
        at grails.web.container.EmbeddableServer$start.call(Unknown Source)
        at _GrailsRun_groovy$_run_closure5_closure11.doCall(_GrailsRun_groovy:145)
        at _GrailsRun_groovy$_run_closure5_closure11.doCall(_GrailsRun_groovy)
        at _GrailsSettings_groovy$_run_closure10.doCall(_GrailsSettings_groovy:269)
        at _GrailsRun_groovy$_run_closure5.doCall(_GrailsRun_groovy:137)
        at _GrailsRun_groovy.runInline(_GrailsRun_groovy:104)
        at _GrailsRun_groovy.this$4$runInline(_GrailsRun_groovy)
        at _GrailsRun_groovy$_run_closure1.doCall(_GrailsRun_groovy:58)
        at RunApp$_run_closure1.doCall(RunApp.groovy:33)
        at gant.Gant$_dispatch_closure4.doCall(Gant.groovy:324)
        at gant.Gant$_dispatch_closure6.doCall(Gant.groovy:334)
        at gant.Gant$_dispatch_closure6.doCall(Gant.groovy)
        at gant.Gant.withBuildListeners(Gant.groovy:344)
        at gant.Gant.this$2$withBuildListeners(Gant.groovy)
        at gant.Gant$this$2$withBuildListeners.callCurrent(Unknown Source)
        at gant.Gant.dispatch(Gant.groovy:334)
        at gant.Gant.this$2$dispatch(Gant.groovy)
        at gant.Gant.invokeMethod(Gant.groovy)
        at gant.Gant.processTargets(Gant.groovy:495)
        at gant.Gant.processTargets(Gant.groovy:480)
Caused by: java.lang.RuntimeException: Unable to locate constructor
with Class parameter for class
org.codehaus.groovy.grails.commons.DefaultGrailsControllerClass
        ... 21 more
Caused by: java.lang.reflect.InvocationTargetException
        ... 21 more
Caused by: org.codehaus.groovy.grails.exceptions.NewInstanceCreationException:
Could not create a new instance of class [LabourTimeCardController]!
        ... 21 more
Caused by: java.lang.OutOfMemoryError: Java heap space
        at java.util.Arrays.copyOfRange(Arrays.java:3209)
        at java.lang.String.<init>(String.java:216)
        at java.lang.StringBuffer.toString(StringBuffer.java:585)
        at LabourTimeCardController$_closure14.<init>(LabourTimeCardController.groovy)
        at LabourTimeCardController.<init>(LabourTimeCardController.groovy:11)
2009-03-31 08:39:19,531 [main] ERROR mortbay.log  - Nested in
org.springframework.beans.factory.BeanCreationException: Error
creating bean with name 'pluginManager' defined in ServletContext
resource
[/WEB-INF/applicationContext.xml]: Invocation of init method failed;
nested exception is java.lang.RuntimeException: Unable to locate
constructor with Class parameter for class org.codehaus.groovy.gra
ils.commons.DefaultGrailsControllerClass:
java.lang.OutOfMemoryError: Java heap space
        at java.util.Arrays.copyOfRange(Arrays.java:3209)
        at java.lang.String.<init>(String.java:216)
        at java.lang.StringBuffer.toString(StringBuffer.java:585)
        at LabourTimeCardController$_closure14.<init>(LabourTimeCardController.groovy)
        at LabourTimeCardController.<init>(LabourTimeCardController.groovy:11)
Server running. Browse to http://localhost:8081/bmi
Exception in thread "Thread-35" java.lang.OutOfMemoryError: Java heap space

any idea why this happen ?

thanks

regards
adwin

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|

Re: grails out of memory

adwin grails
in stacktrace.log

2009-03-31 08:46:42,406 [main] ERROR StackTrace  - Sanitizing stacktrace:
java.lang.OutOfMemoryError: Java heap space
        at java.lang.Class.getDeclaredMethods0(Native Method)
        at java.lang.Class.privateGetDeclaredMethods(Class.java:2427)
        at java.lang.Class.getMethod0(Class.java:2670)
        at java.lang.Class.getMethod(Class.java:1603)
        at org.springframework.beans.BeanUtils.findMethod(BeanUtils.java:136)
        at org.codehaus.groovy.grails.commons.GrailsClassUtils.isJdk5Enum(GrailsClassUtils.java:1052)
        at org.codehaus.groovy.grails.commons.DomainClassArtefactHandler.isDomainClass(DomainClassArtefactHandler.java:60)
        at org.codehaus.groovy.grails.commons.DefaultGrailsDomainClass.establishRelationships(DefaultGrailsDomainClass.java:236)
        at org.codehaus.groovy.grails.commons.DefaultGrailsDomainClass.<init>(DefaultGrailsDomainClass.java:99)
        at org.codehaus.groovy.grails.commons.DomainClassArtefactHandler.newArtefactClass(DomainClassArtefactHandler.java:35)
        at org.codehaus.groovy.grails.commons.DefaultGrailsApplication.addArtefact(DefaultGrailsApplication.java:590)
        at org.codehaus.groovy.grails.commons.DefaultGrailsApplication.configureLoadedClasses(DefaultGrailsApplication.java:312)
        at org.codehaus.groovy.grails.commons.DefaultGrailsApplication.initialise(DefaultGrailsApplication.java:797)
        at org.codehaus.groovy.grails.plugins.GrailsPluginManagerFactoryBean.afterPropertiesSet(GrailsPluginManagerFactoryBean.java:114)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1369)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1335)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:473)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
        at java.security.AccessController.doPrivileged(Native Method)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
        at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)
        at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
        at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:423)
        at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:728)
        at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:380)
        at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:255)
        at org.codehaus.groovy.grails.web.context.GrailsContextLoader.createWebApplicationContext(GrailsContextLoader.java:65)
        at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:199)
        at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:45)

any idea how to solve this ?
thank you ...

On Tue, Mar 31, 2009 at 8:46 AM, adwin grails
<[hidden email]> wrote:

> Hi,
>
> I am still doing development and just move to 1.1 and I got this Out
> of memory (I have disable auto compile from the run-app as FAQ
> recommend, -Ddisable.auto.recompile=true)
>
> here is the error
>
> Running Grails application..
> 2009-03-31 08:38:28,062 [main] ERROR
> commons.DefaultGrailsControllerClass  - The allowedMethods property in
> AuditLogEventController should be declared static.  The non static
> version is supported for
> now but has been deprecated and may not work in future versions of Grails.
> 2009-03-31 08:39:18,984 [main] ERROR context.ContextLoader  - Context
> initialization failed
> org.springframework.beans.factory.BeanCreationException: Error
> creating bean with name 'pluginManager' defined in ServletContext
> resource [/WEB-INF/applicationContext.xml]: Invocation of init method
> f
> ailed; nested exception is java.lang.RuntimeException: Unable to
> locate constructor with Class parameter for class
> org.codehaus.groovy.grails.commons.DefaultGrailsControllerClass
>        at java.security.AccessController.doPrivileged(Native Method)
>        at grails.web.container.EmbeddableServer$start.call(Unknown Source)
>        at _GrailsRun_groovy$_run_closure5_closure11.doCall(_GrailsRun_groovy:145)
>        at _GrailsRun_groovy$_run_closure5_closure11.doCall(_GrailsRun_groovy)
>        at _GrailsSettings_groovy$_run_closure10.doCall(_GrailsSettings_groovy:269)
>        at _GrailsRun_groovy$_run_closure5.doCall(_GrailsRun_groovy:137)
>        at _GrailsRun_groovy.runInline(_GrailsRun_groovy:104)
>        at _GrailsRun_groovy.this$4$runInline(_GrailsRun_groovy)
>        at _GrailsRun_groovy$_run_closure1.doCall(_GrailsRun_groovy:58)
>        at RunApp$_run_closure1.doCall(RunApp.groovy:33)
>        at gant.Gant$_dispatch_closure4.doCall(Gant.groovy:324)
>        at gant.Gant$_dispatch_closure6.doCall(Gant.groovy:334)
>        at gant.Gant$_dispatch_closure6.doCall(Gant.groovy)
>        at gant.Gant.withBuildListeners(Gant.groovy:344)
>        at gant.Gant.this$2$withBuildListeners(Gant.groovy)
>        at gant.Gant$this$2$withBuildListeners.callCurrent(Unknown Source)
>        at gant.Gant.dispatch(Gant.groovy:334)
>        at gant.Gant.this$2$dispatch(Gant.groovy)
>        at gant.Gant.invokeMethod(Gant.groovy)
>        at gant.Gant.processTargets(Gant.groovy:495)
>        at gant.Gant.processTargets(Gant.groovy:480)
> Caused by: java.lang.RuntimeException: Unable to locate constructor
> with Class parameter for class
> org.codehaus.groovy.grails.commons.DefaultGrailsControllerClass
>        ... 21 more
> Caused by: java.lang.reflect.InvocationTargetException
>        ... 21 more
> Caused by: org.codehaus.groovy.grails.exceptions.NewInstanceCreationException:
> Could not create a new instance of class [LabourTimeCardController]!
>        ... 21 more
> Caused by: java.lang.OutOfMemoryError: Java heap space
>        at java.util.Arrays.copyOfRange(Arrays.java:3209)
>        at java.lang.String.<init>(String.java:216)
>        at java.lang.StringBuffer.toString(StringBuffer.java:585)
>        at LabourTimeCardController$_closure14.<init>(LabourTimeCardController.groovy)
>        at LabourTimeCardController.<init>(LabourTimeCardController.groovy:11)
> 2009-03-31 08:39:18,984 [main] ERROR mortbay.log  - Failed startup of
> context org.mortbay.jetty.webapp.WebAppContext@881278{/bmi,H:\project\bmi\bmi/web-app}
> org.springframework.beans.factory.BeanCreationException: Error
> creating bean with name 'pluginManager' defined in ServletContext
> resource [/WEB-INF/applicationContext.xml]: Invocation of init method
> f
> ailed; nested exception is java.lang.RuntimeException: Unable to
> locate constructor with Class parameter for class
> org.codehaus.groovy.grails.commons.DefaultGrailsControllerClass
>        at java.security.AccessController.doPrivileged(Native Method)
>        at grails.web.container.EmbeddableServer$start.call(Unknown Source)
>        at _GrailsRun_groovy$_run_closure5_closure11.doCall(_GrailsRun_groovy:145)
>        at _GrailsRun_groovy$_run_closure5_closure11.doCall(_GrailsRun_groovy)
>        at _GrailsSettings_groovy$_run_closure10.doCall(_GrailsSettings_groovy:269)
>        at _GrailsRun_groovy$_run_closure5.doCall(_GrailsRun_groovy:137)
>        at _GrailsRun_groovy.runInline(_GrailsRun_groovy:104)
>        at _GrailsRun_groovy.this$4$runInline(_GrailsRun_groovy)
>        at _GrailsRun_groovy$_run_closure1.doCall(_GrailsRun_groovy:58)
>        at RunApp$_run_closure1.doCall(RunApp.groovy:33)
>        at gant.Gant$_dispatch_closure4.doCall(Gant.groovy:324)
>        at gant.Gant$_dispatch_closure6.doCall(Gant.groovy:334)
>        at gant.Gant$_dispatch_closure6.doCall(Gant.groovy)
>        at gant.Gant.withBuildListeners(Gant.groovy:344)
>        at gant.Gant.this$2$withBuildListeners(Gant.groovy)
>        at gant.Gant$this$2$withBuildListeners.callCurrent(Unknown Source)
>        at gant.Gant.dispatch(Gant.groovy:334)
>        at gant.Gant.this$2$dispatch(Gant.groovy)
>        at gant.Gant.invokeMethod(Gant.groovy)
>        at gant.Gant.processTargets(Gant.groovy:495)
>        at gant.Gant.processTargets(Gant.groovy:480)
> Caused by: java.lang.RuntimeException: Unable to locate constructor
> with Class parameter for class
> org.codehaus.groovy.grails.commons.DefaultGrailsControllerClass
>        ... 21 more
> Caused by: java.lang.reflect.InvocationTargetException
>        ... 21 more
> Caused by: org.codehaus.groovy.grails.exceptions.NewInstanceCreationException:
> Could not create a new instance of class [LabourTimeCardController]!
>        ... 21 more
> Caused by: java.lang.OutOfMemoryError: Java heap space
>        at java.util.Arrays.copyOfRange(Arrays.java:3209)
>        at java.lang.String.<init>(String.java:216)
>        at java.lang.StringBuffer.toString(StringBuffer.java:585)
>        at LabourTimeCardController$_closure14.<init>(LabourTimeCardController.groovy)
>        at LabourTimeCardController.<init>(LabourTimeCardController.groovy:11)
> 2009-03-31 08:39:19,531 [main] ERROR mortbay.log  - Nested in
> org.springframework.beans.factory.BeanCreationException: Error
> creating bean with name 'pluginManager' defined in ServletContext
> resource
> [/WEB-INF/applicationContext.xml]: Invocation of init method failed;
> nested exception is java.lang.RuntimeException: Unable to locate
> constructor with Class parameter for class org.codehaus.groovy.gra
> ils.commons.DefaultGrailsControllerClass:
> java.lang.OutOfMemoryError: Java heap space
>        at java.util.Arrays.copyOfRange(Arrays.java:3209)
>        at java.lang.String.<init>(String.java:216)
>        at java.lang.StringBuffer.toString(StringBuffer.java:585)
>        at LabourTimeCardController$_closure14.<init>(LabourTimeCardController.groovy)
>        at LabourTimeCardController.<init>(LabourTimeCardController.groovy:11)
> Server running. Browse to http://localhost:8081/bmi
> Exception in thread "Thread-35" java.lang.OutOfMemoryError: Java heap space
>
> any idea why this happen ?
>
> thanks
>
> regards
> adwin
>

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|

Re: grails out of memory

pledbrook
In reply to this post by adwin grails
> any idea why this happen ?

What's your max memory? Sounds like it's too low. Maybe you have
JAVA_OPTS with a low value set?

Cheers,

Peter

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|

Re: grails out of memory

adwin grails
Thanks Peter,

i just know and set the JAVA_OPTS  to 256m and it works.
is 256m enough ? I have around 70 domains and around 10-20 services...

grails ate lot of memory :)



On Tue, Mar 31, 2009 at 4:09 PM, Peter Ledbrook <[hidden email]> wrote:

>> any idea why this happen ?
>
> What's your max memory? Sounds like it's too low. Maybe you have
> JAVA_OPTS with a low value set?
>
> Cheers,
>
> Peter
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>    http://xircles.codehaus.org/manage_email
>
>
>

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|

Re: grails out of memory

Daniel Honig
In my experience grails can burn through alot of memory fast, number of domains and services is somewhat relevant, but more relevant is the size of the data your managing in those domains and much you bring into RAM at any given time....

I would say that you probably need to with a heap size of around 512m and probably even greater than that....

My production server is set to a heap size of 1536m....but this size is what my performance tests showed to be optimal for my app....

You can certainly run a grails app with 256m....Just depending on the app you will need more memory.*


* JVM Tuning as a whole is a much larger topic than I wish to discuss here.



On Tue, Mar 31, 2009 at 2:40 PM, adwin grails <[hidden email]> wrote:
Thanks Peter,

i just know and set the JAVA_OPTS  to 256m and it works.
is 256m enough ? I have around 70 domains and around 10-20 services...

grails ate lot of memory :)



On Tue, Mar 31, 2009 at 4:09 PM, Peter Ledbrook <[hidden email]> wrote:
>> any idea why this happen ?
>
> What's your max memory? Sounds like it's too low. Maybe you have
> JAVA_OPTS with a low value set?
>
> Cheers,
>
> Peter
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>    http://xircles.codehaus.org/manage_email
>
>
>

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email



Reply | Threaded
Open this post in threaded view
|

Re: grails out of memory

adwin grails
Hi,

is it possible to let grails/java take control on memory management ?
for example, I have 3 gb on development server and on production
server i have 4 gb.
can grails, takes as much as grails/java needs ? for example, if they
need 200mb then they just took whatever it available and if it needs
more, they dont need to yield "out of memory" and just take whatever
they need (as long the memory is available for them)

may be i should learn more about java tuning as well :)

regards
adwin

On Wed, Apr 1, 2009 at 1:48 AM, Daniel Honig <[hidden email]> wrote:

> In my experience grails can burn through alot of memory fast, number of
> domains and services is somewhat relevant, but more relevant is the size of
> the data your managing in those domains and much you bring into RAM at any
> given time....
>
> I would say that you probably need to with a heap size of around 512m and
> probably even greater than that....
>
> My production server is set to a heap size of 1536m....but this size is what
> my performance tests showed to be optimal for my app....
>
> You can certainly run a grails app with 256m....Just depending on the app
> you will need more memory.*
>
>
> * JVM Tuning as a whole is a much larger topic than I wish to discuss here.
>
>
>
> On Tue, Mar 31, 2009 at 2:40 PM, adwin grails
> <[hidden email]> wrote:
>>
>> Thanks Peter,
>>
>> i just know and set the JAVA_OPTS  to 256m and it works.
>> is 256m enough ? I have around 70 domains and around 10-20 services...
>>
>> grails ate lot of memory :)
>>
>>
>>
>> On Tue, Mar 31, 2009 at 4:09 PM, Peter Ledbrook <[hidden email]>
>> wrote:
>> >> any idea why this happen ?
>> >
>> > What's your max memory? Sounds like it's too low. Maybe you have
>> > JAVA_OPTS with a low value set?
>> >
>> > Cheers,
>> >
>> > Peter
>> >
>> > ---------------------------------------------------------------------
>> > To unsubscribe from this list, please visit:
>> >
>> >    http://xircles.codehaus.org/manage_email
>> >
>> >
>> >
>>
>> ---------------------------------------------------------------------
>> To unsubscribe from this list, please visit:
>>
>>    http://xircles.codehaus.org/manage_email
>>
>>
>
>

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|

Re: grails out of memory

Daniel Honig
Properly understanding JVM tuning is far outside what I can explain here, however Sun has a nice whitepaper that is great introduction to the topic:

http://java.sun.com/performance/reference/whitepapers/tuning.html

(To really get it you need to understand the actual garbage collection algorithms, such as Mark and Sweep which most modern Garbage Collection algorithms are based on)

But once you come up with something you can always post it to this thread and I'll take a look at it and I'm sure others will....





On Tue, Mar 31, 2009 at 2:55 PM, adwin grails <[hidden email]> wrote:
Hi,

is it possible to let grails/java take control on memory management ?
for example, I have 3 gb on development server and on production
server i have 4 gb.
can grails, takes as much as grails/java needs ? for example, if they
need 200mb then they just took whatever it available and if it needs
more, they dont need to yield "out of memory" and just take whatever
they need (as long the memory is available for them)

may be i should learn more about java tuning as well :)

regards
adwin

On Wed, Apr 1, 2009 at 1:48 AM, Daniel Honig <[hidden email]> wrote:
> In my experience grails can burn through alot of memory fast, number of
> domains and services is somewhat relevant, but more relevant is the size of
> the data your managing in those domains and much you bring into RAM at any
> given time....
>
> I would say that you probably need to with a heap size of around 512m and
> probably even greater than that....
>
> My production server is set to a heap size of 1536m....but this size is what
> my performance tests showed to be optimal for my app....
>
> You can certainly run a grails app with 256m....Just depending on the app
> you will need more memory.*
>
>
> * JVM Tuning as a whole is a much larger topic than I wish to discuss here.
>
>
>
> On Tue, Mar 31, 2009 at 2:40 PM, adwin grails
> <[hidden email]> wrote:
>>
>> Thanks Peter,
>>
>> i just know and set the JAVA_OPTS  to 256m and it works.
>> is 256m enough ? I have around 70 domains and around 10-20 services...
>>
>> grails ate lot of memory :)
>>
>>
>>
>> On Tue, Mar 31, 2009 at 4:09 PM, Peter Ledbrook <[hidden email]>
>> wrote:
>> >> any idea why this happen ?
>> >
>> > What's your max memory? Sounds like it's too low. Maybe you have
>> > JAVA_OPTS with a low value set?
>> >
>> > Cheers,
>> >
>> > Peter
>> >
>> > ---------------------------------------------------------------------
>> > To unsubscribe from this list, please visit:
>> >
>> >    http://xircles.codehaus.org/manage_email
>> >
>> >
>> >
>>
>> ---------------------------------------------------------------------
>> To unsubscribe from this list, please visit:
>>
>>    http://xircles.codehaus.org/manage_email
>>
>>
>
>

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email