Description
Charles Yates opened SPR-11545 and commented
We have a web application that averages around 30 hits per minute. After upgrading Spring from 3.2.5 to 3.2.7 we observed some problems. Over a period of one week there was a slow increase in heap usage resulting in OutOfMemoryErrors, and a gradual increase in CPU per request by a factor of ten.
CPU profiling shows the bulk of the time increase is in the method adaptInnerBeanName of BeanDefinitionValueResolver. Heap analysis shows the increase in memory use is in the ConcurrentHashMaps dependentBeanMap and dependenciesForBeanMap of DefaultSingletonBeanRegistry.
This problem appears to be a result of commit d0fc38e, the fix for issue #15757.
This application uses something on the order of 100 or so prototype beans per request. Over time providing these beans with unique names is an unmanageable proposition.
Affects: 3.2.6, 3.2.7, 3.2.8
Issue Links:
- Dependency Injection issue when using ManagedMap or ManagedList in BeanDefinitionParser [SPR-11131] #15757 Dependency Injection issue when using ManagedMap or ManagedList in BeanDefinitionParser
- Regression: InjectionMetadata cache needs to handle different bean classes per bean name [SPR-11246] #15871 Regression: InjectionMetadata cache needs to handle different bean classes per bean name
Backported to: 3.2.9