Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Out of Memory PermGen issue when using Spring 3
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  5 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Zo  
View profile  
 More options Sep 8 2011, 9:28 pm
From: Zo <alonzo_bu...@hotmail.com>
Date: Thu, 8 Sep 2011 18:28:20 -0700 (PDT)
Local: Thurs, Sep 8 2011 9:28 pm
Subject: Out of Memory PermGen issue when using Spring 3
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.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Brian Hurley  
View profile  
 More options Sep 8 2011, 9:48 pm
From: Brian Hurley <brhur...@gmail.com>
Date: Thu, 08 Sep 2011 20:48:25 -0500
Local: Thurs, Sep 8 2011 9:48 pm
Subject: Re: Out of Memory PermGen issue when using Spring 3
In my experience using CGLIB can cause locking of the permgen memory for
those classes and dependent classes.  The first thing that you can do is
to program to the interface and get rid of the CGLIB if possible.  
However, in the mean time you can increase the memory on the permgen.

Lets see if anyone else has experience with this error and found a
better way to solve it.

Regards,
Brian

--
Regards,
Brian Hurley
Secret...@JavaMUG.org
Leader Spring Dallas User Group

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
John Jacobs  
View profile  
 More options Sep 9 2011, 1:06 am
From: John Jacobs <john99jac...@gmail.com>
Date: Fri, 9 Sep 2011 00:06:20 -0500
Local: Fri, Sep 9 2011 1:06 am
Subject: Re: Out of Memory PermGen issue when using Spring 3

If you are using declarative transaction management (via
@Transactional or <tx:advice

>) then your CGLIB proxies may be coming from there.  You can try using

aspectj instead of CGLIB.  Here's an example configuration if you use
annotations:

<tx:annotation-driven mode="aspectj" transaction-manager=
"myTransactionManager"/>

There are some subtle differences when using as aspectj which are well
documented here:
http://static.springsource.org/spring/docs/2.5.x/reference/transactio...


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
alonzo_burns @ hotmail. com  
View profile  
 More options Sep 9 2011, 2:17 pm
From: alonzo_bu...@hotmail.com <alonzo_bu...@hotmail.com>
Date: Fri, 9 Sep 2011 13:17:19 -0500
Local: Fri, Sep 9 2011 2:17 pm
Subject: Re: Out of Memory PermGen issue when using Spring 3

Brian,

After modifying the code example to implement an interface and return it from the Bean Config, Spring is still using CGLIB. I discovered that if I use the xml configuration instead of the @Configuration, it works fine. Is this a way to force Spring not to use CGLIB when using the Config annotation?

Sent from my Verizon Wireless Phone

----- Reply message -----
From: "Brian Hurley" <brhur...@gmail.com>
Date: Thu, Sep 8, 2011 8:48 pm
Subject: Out of Memory PermGen issue when using Spring 3
To: <javamug-discussion@googlegroups.com>

In my experience using CGLIB can cause locking of the permgen memory for those classes and dependent classes.  The first thing that you can do is to program to the interface and get rid of the CGLIB if possible.   However, in the mean time you can increase the memory on the permgen.

Lets see if anyone else has experience with this error and found a better way to solve it.

Regards,
Brian

--
Regards,
Brian Hurley
Secret...@JavaMUG.org
Leader Spring Dallas User Group

--
You received this message because you are subscribed to the Google Groups "JavaMUG Discussion" group.
To post to this group, send email to javamug-discussion@googlegroups.com.
To unsubscribe from this group, send email to javamug-discussion+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/javamug-discussion?hl=en.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Brian Hurley  
View profile  
 More options Sep 10 2011, 1:11 pm
From: Brian Hurley <brhur...@gmail.com>
Date: Sat, 10 Sep 2011 12:11:56 -0500
Local: Sat, Sep 10 2011 1:11 pm
Subject: Re: Out of Memory PermGen issue when using Spring 3
I have not worked with @Configuration much as I usually use the XML to
get things started with my spring apps.  What if you create an interface
of the config class and put the @Configuration on the interface?   Try
that and let me know.

Regards,
Brian

-------- Original Message  --------
Subject: Re: Out of Memory PermGen issue when using Spring 3
From: alonzo_bu...@hotmail.com <alonzo_bu...@hotmail.com>
To: Brian Hurley <brhur...@gmail.com>, javamug-discussion@googlegroups.com
Date: 09/09/2011 13:17

--
Regards,
Brian Hurley
Secret...@JavaMUG.org
Leader Spring Dallas User Group

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions Older topic »