Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Revisions: Issue #43309 All Revisions ] Back to Issue ]
Summary 0043309: Memory leak in SBOImporterStore and SBOExporterStore
Revision 2020-02-24 16:53 by caristu
Description The SBOImporterStore is an @ApplicationScoped bean that centralizes the generation of SBOImporters. To do so, it has an injection to point to retrieve the SBOImporter beans (which are @Dependant scoped) and retrieves the correct instance depending on an Entity Mapping in particular (this is because currently we support two kind of mapping types: ManualBOB and RetailAPI)

The problem is that all these created instances are living as long as the bean instance they are injected in is living. As the SBOImporterStore is @ApplicationScoped they are never being garbage collected which can eventually lead to OutOfMemory errors (see attached images with a memory dump of an environment affected by this issue).

This very same problem also happens with the SBOExporterStore.

See here[1] for a more detailed explanation regarding this problem.

[1] https://blog.akquinet.de/2017/01/04/dont-get-trapped-into-a-memory-leak-using-cdi-instance-injection/ [^]
Revision 2020-02-24 16:47 by caristu
Description The SBOImporterStore is an @ApplicationScoped bean that centralizes the generation of SBOImporters. To do so, it has an injection to point to retrieve the SBOImporter beans (which are @Dependant scoped) and retrieves the correct instance depending on an Entity Mapping in particular (this is because currently we support two kind of mapping types: ManualBOB and RetailAPI)

The problem is that all these created instances are living as long as the bean instance they are injected in is living. As the SBOImporterStore is @ApplicationScoped they are never being garbage collected which can eventually lead to OutOfMemory errors.

This very same problem also happens with the SBOExporterStore.

See here[1] for a more detailed explanation regarding this problem.

[1] https://blog.akquinet.de/2017/01/04/dont-get-trapped-into-a-memory-leak-using-cdi-instance-injection/ [^]


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker