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 Tomcat 7.0.50 restart. Any other ideas are appreciated On Thu, Feb 6, 2014 at 7:28 PM, Martin Grigorov <mgrigo...@apache.org>wrote: > 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 : > -XX:PermSize and -XX:MaxPermSize. > Use JConsole to see what size you need. > > If this error happens on redeploy then most probably you have a ClassLoader > memory leak, i.e. you keep references to Class instances and they cannot be > released so the PermGen is overloaded. Those are very tricky to be > debugged. > > > Martin Grigorov > Wicket Training and Consulting > > > On Thu, Feb 6, 2014 at 1:07 PM, Maxim Solodovnik <solomax...@gmail.com > >wrote: > > > 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 > > > > -- > > WBR > > Maxim aka solomax > > > -- WBR Maxim aka solomax