Quantcast

Memory leak

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Memory leak

Paweł Gdula-2
Hey 

Our application suffers from intense memory leak. Our platform uses Grails 1.3.7, and we have quite intensive traffic on it. But because of memory leak we are forced to restart servers every one or two days. Our guess was that its our mistake and we started to looking on heap dumps to find root of the problem. One of the issues we found was hibernate (https://hibernate.onjira.com/browse/HHH-2431), another one seems to be a problem with Grails itself (http://jira.grails.org/browse/GRAILS-7378). Both of this errors seems to be fixed in Grails version 2.1. But before we upgrade to it we wanted to test if its really solution for us. I created  simple testing env:

- Grails app (fresh one, no additional plugins) with one domain object Test(name:String) which was created 1000 times and when used requested main page list of all instances was send to him
- war was build in production mode and deployed on Tomcat 7.0.29 (default config) with -Xmx512m 
- jconsole was connected to the app to monitor whats going on there
- jmeter test was created (100 threads requesting page with list of domain object)

This was done for:

- Grails 1.3.7 app
- Grais 1.3.7 app upgraded to Grails 2.1.0
- Grails 2.1.0 app

Unfortunately, seems that all of them suffer from some kind of memory leak (check attachment). Maybe my test is somehow corrupted? Any hints?

Cheers

Paweł


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

    http://xircles.codehaus.org/manage_email

OOM_1.3.7.jpg (45K) Download Attachment
oom_grails_1.3.7_upgraded_2.1.0.jpg (76K) Download Attachment
oom_grais_2.1.0.jpg (76K) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: Memory leak

pledbrook
> - Grails app (fresh one, no additional plugins) with one domain object
> Test(name:String) which was created 1000 times and when used requested main
> page list of all instances was send to him
> - war was build in production mode and deployed on Tomcat 7.0.29 (default
> config) with -Xmx512m
> - jconsole was connected to the app to monitor whats going on there
> - jmeter test was created (100 threads requesting page with list of domain
> object)

Do you have your sample project available anywhere? You could be
running into a Hibernate session issue, but that depends on what the
code is doing.

Peter

--
Peter Ledbrook
Developer Advocate
VMware

t: @pledbrook

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

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: Memory leak

Paweł Gdula-2
http://dl.dropbox.com/u/50423520/memory_leak.tar.gz

There are 3 apps. All of them are really simple. All of them use in memory db. They do nothing generally. 

On 22 August 2012 11:55, Peter Ledbrook <[hidden email]> wrote:
> - Grails app (fresh one, no additional plugins) with one domain object
> Test(name:String) which was created 1000 times and when used requested main
> page list of all instances was send to him
> - war was build in production mode and deployed on Tomcat 7.0.29 (default
> config) with -Xmx512m
> - jconsole was connected to the app to monitor whats going on there
> - jmeter test was created (100 threads requesting page with list of domain
> object)

Do you have your sample project available anywhere? You could be
running into a Hibernate session issue, but that depends on what the
code is doing.

Peter

--
Peter Ledbrook
Developer Advocate
VMware

t: @pledbrook

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

    http://xircles.codehaus.org/manage_email



Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: Memory leak

Jonathan Stott-5
Have you tried not using an in-memory DB? If you're saving 1000 domain objects per request then your DB will gradually use all the memory available.

Jonathan


On 22 August 2012 11:07, Paweł Gdula <[hidden email]> wrote:
http://dl.dropbox.com/u/50423520/memory_leak.tar.gz

There are 3 apps. All of them are really simple. All of them use in memory db. They do nothing generally. 


On 22 August 2012 11:55, Peter Ledbrook <[hidden email]> wrote:
> - Grails app (fresh one, no additional plugins) with one domain object
> Test(name:String) which was created 1000 times and when used requested main
> page list of all instances was send to him
> - war was build in production mode and deployed on Tomcat 7.0.29 (default
> config) with -Xmx512m
> - jconsole was connected to the app to monitor whats going on there
> - jmeter test was created (100 threads requesting page with list of domain
> object)

Do you have your sample project available anywhere? You could be
running into a Hibernate session issue, but that depends on what the
code is doing.

Peter

--
Peter Ledbrook
Developer Advocate
VMware

t: @pledbrook

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

    http://xircles.codehaus.org/manage_email






--
Dr Jonathan Stott
Development Team Leader

Axon Limited
"Connecting Healthcare"
2 Venture Road
University of Southampton Science Park
Southampton SO16 7NP


Tel: +44 (0)2380 11 11 99
Mobile: +44(0)7950 467087

www.axonuk.com

This message and the information contained therein is intended only for the use of the person(s) to whom it is addressed.  It may contain information that is confidential or privileged within the meaning of applicable law.  If you are not the intended recipient, please contact the sender as soon as possible and delete this message from your system; please also note that any use or disclosure of the information contained in this message (including any attachments) is strictly prohibited and may be unlawful.  This correspondence may include examples or terms based upon current assumptions with any costs shown excluding VAT and cannot be considered as a quotation, offer or commitment in any way.  Whilst reasonable precaution has been taken to minimise the risk, the contents or an attachment to this e-mail may have become corrupted during transmission or contain viruses, we cannot accept liability in this regard, and you should carry out your own virus checks.

Axon Limited is a Company registered in England and Wales number 5728502. Registered Office: Imperial House, 18-21 Kings Park Road, Southampton SO15 2AT

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: Memory leak

Paweł Gdula-2
Objects are created during bootstrap, that shouldn't be a problem.

On 22 August 2012 12:12, Jonathan Stott <[hidden email]> wrote:
Have you tried not using an in-memory DB? If you're saving 1000 domain objects per request then your DB will gradually use all the memory available.

Jonathan



On 22 August 2012 11:07, Paweł Gdula <[hidden email]> wrote:
http://dl.dropbox.com/u/50423520/memory_leak.tar.gz

There are 3 apps. All of them are really simple. All of them use in memory db. They do nothing generally. 


On 22 August 2012 11:55, Peter Ledbrook <[hidden email]> wrote:
> - Grails app (fresh one, no additional plugins) with one domain object
> Test(name:String) which was created 1000 times and when used requested main
> page list of all instances was send to him
> - war was build in production mode and deployed on Tomcat 7.0.29 (default
> config) with -Xmx512m
> - jconsole was connected to the app to monitor whats going on there
> - jmeter test was created (100 threads requesting page with list of domain
> object)

Do you have your sample project available anywhere? You could be
running into a Hibernate session issue, but that depends on what the
code is doing.

Peter

--
Peter Ledbrook
Developer Advocate
VMware

t: @pledbrook

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

    http://xircles.codehaus.org/manage_email






--
Dr Jonathan Stott
Development Team Leader

Axon Limited
"Connecting Healthcare"
2 Venture Road
University of Southampton Science Park
Southampton SO16 7NP


Tel: +44 (0)2380 11 11 99
Mobile: +44(0)7950 467087

www.axonuk.com

This message and the information contained therein is intended only for the use of the person(s) to whom it is addressed.  It may contain information that is confidential or privileged within the meaning of applicable law.  If you are not the intended recipient, please contact the sender as soon as possible and delete this message from your system; please also note that any use or disclosure of the information contained in this message (including any attachments) is strictly prohibited and may be unlawful.  This correspondence may include examples or terms based upon current assumptions with any costs shown excluding VAT and cannot be considered as a quotation, offer or commitment in any way.  Whilst reasonable precaution has been taken to minimise the risk, the contents or an attachment to this e-mail may have become corrupted during transmission or contain viruses, we cannot accept liability in this regard, and you should carry out your own virus checks.

Axon Limited is a Company registered in England and Wales number 5728502. Registered Office: Imperial House, 18-21 Kings Park Road, Southampton SO15 2AT


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: Memory leak

pledbrook
> Objects are created during bootstrap, that shouldn't be a problem.

Are you actually running into an OutOfMemoryError or sustained
thrashing in the heap? What happens if you run a full GC at the end of
the test run? I've done some local testing against a MySQL database
and I'm not seeing a persistent increase in memory consumption. I
definitely recommend that you use an external database in your
testing.

Peter

--
Peter Ledbrook
Developer Advocate
VMware

t: @pledbrook

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

    http://xircles.codehaus.org/manage_email


Loading...