Memory leaks best practices

2014-02-06 Thread Maxim Solodovnik
Hello All, Recently we have deployed our project to wicket project to production server. And start getting OutOfMemory PermGenSpace. I believe we have memory leak in our application maybe there is best practices how to deal with Models and JPA entities to resolve this? Thanks in advance --

RE: Memory leaks best practices

2014-02-06 Thread Richter, Marvin
...@gmail.com] Sent: Thursday, February 06, 2014 1:09 PM To: users@wicket.apache.org Subject: Memory leaks best practices Hello All, Recently we have deployed our project to wicket project to production server. And start getting OutOfMemory PermGenSpace. I believe we have memory leak in our

Re: Memory leaks best practices

2014-02-06 Thread Sven Meier
Probably a class-loading issue: http://stackoverflow.com/questions/88235/dealing-with-java-lang-outofmemoryerror-permgen-space-error Sven On 02/06/2014 01:07 PM, Maxim Solodovnik wrote: Hello All, Recently we have deployed our project to wicket project to production server. And start getting

Re: Memory leaks best practices

2014-02-06 Thread Martin Grigorov
Hi, OOM in PermGen is not what you ask for. If you leak normal memory than the error would be with heap space. PermGen memory is used to keep the Class instances and interned Strings. If you deploy your app for first time then most probably you just need to set the proper initial and max value :

Re: Memory leaks best practices

2014-02-06 Thread Maxim Solodovnik
Thanks a lot for quick answers have already added -Xms512M -Xmx2G -Xss1M -XX:PermSize=192m -XX:MaxPermSize=512m -XX:+CMSClassUnloadingEnabled Now will add *Model.detach(); to the code and will check the stability (currently application works ~2days before PermGen) Redeployment is performed using

Re: Memory leaks best practices

2014-02-06 Thread Shengche Hsiao
I had the same issue, my problem was doesn't close the database connection! On Thu, Feb 6, 2014 at 8:54 PM, Maxim Solodovnik solomax...@gmail.comwrote: Thanks a lot for quick answers have already added -Xms512M -Xmx2G -Xss1M -XX:PermSize=192m -XX:MaxPermSize=512m -XX:+CMSClassUnloadingEnabled

Re: Memory leaks best practices

2014-02-06 Thread Maxim Solodovnik
In my case OpenJPA handle DB connection open/close/pooling, so I hope this is not the case. Maybe you can suggest server side memory profiler for Ubuntu server? On Thu, Feb 6, 2014 at 9:12 PM, Shengche Hsiao shengchehs...@gmail.comwrote: I had the same issue, my problem was doesn't close the

Re: Memory leaks best practices

2014-02-06 Thread Martin Grigorov
The best memory profiler is Eclipse MAT - https://www.eclipse.org/mat/ But again it helps only with debugging problems in the heap, not in the perm gen Martin Grigorov Wicket Training and Consulting On Thu, Feb 6, 2014 at 3:18 PM, Maxim Solodovnik solomax...@gmail.comwrote: In my case OpenJPA

Re: Memory leaks best practices

2014-02-06 Thread francois meillet
http://www.yourkit.com/docs/kb/class_loaders.jsp François On Thu, Feb 6, 2014 at 3:22 PM, Martin Grigorov mgrigo...@apache.orgwrote: The best memory profiler is Eclipse MAT - https://www.eclipse.org/mat/ But again it helps only with debugging problems in the heap, not in the perm gen