• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Liutauras Vilda
  • Paul Clapham
Sheriffs:
  • paul wheaton
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Piet Souris
Bartenders:
  • Mike London

Spring CGLIB perm gen heap memory issue

 
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Ranchers,

We are having an out of memory issue in our application.
Environment : JBoss 6.0, Spring 3, Hibernate 3.6

We use annotation based spring bean configuration as below. We get context and close and end of the operation.

AnnotationConfigApplicationContext beanContext = new AnnotationConfigApplicationContext(BeanConfig.class);
TestDAO testDAO = beanContext .getName("testDAO")
beanContext .close();
beanContext .destroy();


But the application ends to OOM issue ( perm gen) after processing few messages.

JVM args at starting of server is below.

JAVA_OPTS=-Xms512M -Xmx768M -XX:MaxPermSize=256M -XX:+UseParNewGC -XX:MaxNewSize=256m -XX:NewSize=256m -XX:MaxTenuringThreshold=0 -XX:SurvivorRatio=128 -XX:+UseTLAB -XX:+UseConcMarkSweepGC -XX:+CMSClassUnloadingEnabled -XX:+CMSPermGenSweepingEnabled

Upon analyzing heap dump with visualvm, we see lots of cglib related inner classes are not being reclaimed by GC.
class names like: BeanConfig$$EnhancerByCGLIB3232$$FastClassByCGLIB$$$

Anyone having similar issue? Any help will be highly appreciated.

Thanks,
John
 
John Hall
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Any help here??
 
Bartender
Posts: 4121
IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What version of CGLib are you using? If you do a web search on OutOfMemoryError FastClassByCGLIB it seems there were some versions that had a bug causing this.
 
John Hall
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Nathan,

We are using cglib-nodep-2.2.2.jar ( this is the latest in cglib site)

I already tried on google, but no final conclusion if we need to use differebnt cglib jar .

Environment : JBoss 6.0, Spring 3.0.5, Hibernate 3.6
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic