I notice that running gradle task in continuous mode, after some time (~2h) eat too much memory.
I have couple project connected by deploying different library, and one project depending on them, and when I change something on some of them, than everything necessary is automatically builded, which is really nice feature.
But after some time, consumption of memory is to huge (check screenshot).
Make sure that you don’t accidentially share sensitive information like passwords or other credentials in the heap dump files.
gists are handy for sharing the dump files. After creating a new gist on github (add a readme file in the UI), clone it with git cli, add the dump files to the cloned gist repo and push the changes. There are also scripts that automate this.
It might be expected behaviour that the memory usage is what you are experiencing. The default maximum heap size for the Gradle daemon client and daemon is 1024 MB. There are also separate Java processes for the Compiler daemons and test runners.
You could adjust the JVM options to optimize for low memory usage by lowering the daemon client JVM’s max heap size to something like 200MB.
export GRADLE_OPTS="-Xmx200m -Dorg.gradle.jvmargs='-Xmx1024m -XX:MaxPermSize=256m'"
You can omit the MaxPermSize setting on Java 8+.
The memory of compiler daemons can be configured with something like this: