You could ask for a memory dump of your environment. But analyzing those can be tricky. Currently doing it for one of our environments with the Eclipse memory analyzer ( https://www.eclipse.org/mat/ ). It gives you already some hints about memory leakage. Currently it is pointing me to two suspects: com.mendix.modules.microflowengine.internal.MicroflowEngineModuleImpl
and java.util.concurrent.ConcurrentHashMap$Node. But I probably still will need Mendix Expert service for fully analyzing this. My first hunch though is that it looks to me that nothing I can do. Specially those ConcurrentHashMaps looks suspicious to me. I can not figure out why those are kept in memory for so long.
does the application make use of custom Java actions which are not part of a standard module from the Marketplace.
Note: not all module in the marketplace are standard module. read: modules supported by Mendix
Just another hypothesis: Are you using any caching?
Have you looked at the Running now section of Metrics? Look for long running requests that could be stuck. These could keep objects alive.
This is a screenshot of a free-app, but you should have access to this feature with Licensed cloud node.
Valentijn, have you found a solution for the problem with the increased memory usage for the unused app?
we are facing the same problem with one of our apps (also running on a small container, Max 1GB memory). Graphs are taken from the unused production version:
Try to see if this problem can be reproduced locally. I often use JVisualVM available in the one of the JDK subfolders to monitor what memory does on my local system. I believe it also come with some options to create dumps and such.
I got the same problem with the system memory.
After some research and testing i could confirm that the JVM Heap Garbage collector works fine. It will only clean up the tenured generation after it hits 2/3 of the total available space. I tested this and it works fine.
The system memory is a different problem. Even when the JVM Heap is cleaned and drops back down, the system memory wont decrease, it increases till 95% and there it stays then. Even when using the application, the memory wont increase further.
We implemented a workaround where we stop and start an environment via the deploy api and a script.