SAP/cloud-sdk

Memory leak from eventing

HrFlorianHoffmann opened this issue · 3 comments

We're observing memory problems with the QPID JMS eventing that comes with the Cloud SDK. Please refer to https://stackoverflow.com/questions/74733418/what-reserves-and-holds-my-java-memory-when-sending-out-amqp-events-from-my-spri for a more detailed description.

Our application runs a process, then sends out some hundreds to thousands of events. While this works, we afterwards see that the application holds on to large memory areas for several hours. Further load within that time will cause the app to run out of memory and crash. We also observe an increase of memory consumption over time, without further load. First memory analysis suggests a memory leak, probably in some lower dependency like Netty.

(A quick look into mvn dependency:tree also showed some old and unreliable version numbers, e.g. the "alpha-2" in org.apache.geronimo.specs:geronimo-jms_2.0_spec:jar:1.0-alpha-2 does not sound like a stable release and is one year behind their current release 2.x.)

Could we please get in touch to discuss the issue and find out whether it's related to the CloudSDK or its dependencies?

Hi @HrFlorianHoffmann,

thanks for reaching out to us!
Can you please provide the dependency tree, so that we can see which version and modules of the SDK you are using?

Thanks for the swift reply!

The messaging related functionality that you use seems to come from the Cloud Application Platform (CAP) related modules, specifically com.sap.cloud.servicesdk.xbem:emjapi-extension-sap-cp-jms.
This support channel here is focused on the SAP Cloud SDK (modules with a group id starting with com.sap.cloud.sdk.), so I cannot help you directly with the memory leak.

If my search pointed me correctly, this should the documentation of CAP related to messaging: https://cap.cloud.sap/docs/java/messaging-foundation
In there you can find in the top right a link to the SAP answers page, where you can ask the CAP colleagues directly.

As we cannot help you further here in this repo, I will close this issue.
Let me know if you have any concerns or objections by re-opening the issue.

Greetings
Chris