Symptom
While the system is running and processing a request, more and more java objects of the following type:
-
org.springframework.context.annotation.CommonAnnotationBeanPostProcessor$ResourceElement
-
java.lang.reflect.Field
-
java.util.LinkedHashMap
- java.util.LinkedHashMap$Entry
are created and no garbage is ever collected.
These objects take up more and more memory space and the application becomes very slow, then runs out of memory and throws out memory errors.
The following heap dump in Memory shows references to those objects are held by Spring's CommonAnnotationBeanProcessor, which never releases them.
Looking at all of those java.lang.reflect.Field objects in detail, it shows that they are all related to some very specific Spring beans, which have the special characteristic that they are created in the yrequest scope. And those objects are apparently Spring-internal meta-information about the annotations of those
request-scoped beans, which are created which each new bean instantiation (with every request), but then they are not released and they are not garbage-collected together with the bean itself.
Read more...
Environment
Hybris Commerce Suite 5.4
- B2C Accelerator
Product
Keywords
memory leak; @Resource; @Autowired; CommonAnnotationBeanPostProcessor; AutowiredAnnotationBeanPostProcessor; hybris , KBA , hybris , spring , @resource , memory leak , CEC-COM-CPS , SAP Commerce , Problem
About this page
This is a preview of a SAP Knowledge Base Article. Click more to access the full version on SAP for Me (Login required).Search for additional results
Visit SAP Support Portal's SAP Notes and KBA Search.