Xmx value for ws-agent's JAVA_OPTS must not exceed total machine RAM
I think part of machine crashes occur because Xmx for ws-agent is set to 2048M while machine run with limit of 1GB RAM. This prevent garbage collector to be fired so linux kernel imposes RAM limit and terminates ws-agent with OutOfMemory error.
We need either dynamically set Xmx to something about no more than 70% of machine's RAM limit or disable starting machine with RAM limit less than 2.5GB if ws-agent is present in machine.
@skabashnyuk - this seems like a very good thing for us to set / control with Che. And perhaps it is not that difficult to add either. Will you consider analyzing this in either the next or next.next sprint?
I think it make sense to do this task after we figure out how to not install maven toolchain in all stacks no matter if they are related to maven or not.
Some BitNami factories use 1GB RAM
@skabashnyuk - can you connect for me the relationship between Maven and the memory on the JVM for ws-agent? I don't see the technology connection.
now
- MAVEN_OPTS=JAVA_OPTS
- Maven server is part of ws-agent aka part of all stacks So we have two JVM running with same xmx. If we start maven command we will have 3 or more.
Ok -that is clear, thanks.
@skabashnyuk will we move forward with this one?
Useful reading on this https://developers.redhat.com/blog/2017/04/04/openjdk-and-containers/
fixed by https://github.com/eclipse/che/issues/7726