Providing unique names to prototype inner beans causes excessive memory and CPU use [SPR-11545] #16170
Labels
status: backported
An issue that has been backported to maintenance branches
type: bug
A general bug
Milestone
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:
Backported to: 3.2.9
The text was updated successfully, but these errors were encountered: