che icon indicating copy to clipboard operation
che copied to clipboard

Xmx value for ws-agent's JAVA_OPTS must not exceed total machine RAM

Open skryzhny opened this issue 9 years ago • 9 comments

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.

skryzhny avatar Feb 16 '17 11:02 skryzhny

@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?

TylerJewell avatar Feb 16 '17 22:02 TylerJewell

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.

skabashnyuk avatar Feb 17 '17 07:02 skabashnyuk

Some BitNami factories use 1GB RAM

musienko-maxim avatar Feb 20 '17 09:02 musienko-maxim

@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.

TylerJewell avatar Feb 20 '17 14:02 TylerJewell

now

  1. MAVEN_OPTS=JAVA_OPTS
  2. 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.

skabashnyuk avatar Feb 20 '17 14:02 skabashnyuk

Ok -that is clear, thanks.

TylerJewell avatar Feb 20 '17 15:02 TylerJewell

@skabashnyuk will we move forward with this one?

ghost avatar Jul 12 '17 10:07 ghost

Useful reading on this https://developers.redhat.com/blog/2017/04/04/openjdk-and-containers/

gorkem avatar Sep 13 '17 20:09 gorkem

fixed by https://github.com/eclipse/che/issues/7726

skabashnyuk avatar Dec 28 '17 07:12 skabashnyuk