-
Notifications
You must be signed in to change notification settings - Fork 38.5k
Prevent memory leaks with @Configuration beans [SPR-9851] #14484
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Juraj Misur commented I forgot to mention: using cglib-nodep 2.2.2 |
Juergen Hoeller commented Chris, could you please have a look at this? It's not the first CGLIB memory leak issue to come up this year, and we might have a better chance of dealing with it now that we upgraded to CGLIB 3.0... |
Chris Beams commented Sure. Thanks, Juraj for the report. |
Chris Beams commented Juraj Misur, this is now fixed in the latest 3.2.0.BUILD-SNAPSHOT. Thanks again for the report!
|
Juraj Misur commented No PermGen errors in today's build 3.2.0.BUILD-20121016.200757-324. Thanks a lot! |
Chris Beams commented Now backported to 3.1.x:
|
Juraj Misur opened SPR-9851 and commented
I have an app where I create many spring contexts for 3rd party classes, so they can autowire some resources, work in restricted environment, basically some "plugin system". These contexts are created and destroyed dynamically, sometimes in rapid pace.
Since I added support for custom javaconfig style context configuration, app started to produce PermGen errors. I traced it to the root of the problem, shown in this simple test:
Config class:
When I run this, I can see clearly in VisualVM that PermGen is heading to the sky. Heapdump revealed gazillion of springctx.MyConfigClass$$EnhancerByCGLIB$$5d91109e entries in CachedIntrospectionResults
When I run it without
@Configuration
annotation, everything is OK.Affects: 3.1.1
Sub-tasks:
@Configuration
beans"Issue Links:
Referenced from: commits 27c8371, ced6bb4, c806139
The text was updated successfully, but these errors were encountered: