WASdev / ci.docker.websphere-traditional

Dockerfiles for WebSphere Application Server traditional
Apache License 2.0
171 stars 192 forks source link

Need to set JVM memory limit env var #98

Open arthurdm opened 5 years ago

arthurdm commented 5 years ago

See https://github.com/WASdev/ci.docker/issues/112#issuecomment-428129214

recena commented 5 years ago

@arthurdm By using these wsadmin commands:

wsadmin> jvm = AdminConfig.list("JavaVirtualMachine")
wsadmin> AdminConfig.modify(jvm, '[[initialHeapSize 1024]]')
wsadmin> AdminConfig.modify(jvm, '[[maximumHeapSize 2048]]')
wsadmin> AdminConfig.save()

I was able to modify the memory but it requires to restart the docker container. And it is not possible without losing the configuration.

What I'm doing (as workaround) is copying my own server.xml in

/opt/IBM/WebSphere/AppServer/profiles/AppSrv01/config/cells/DefaultCell01/nodes/DefaultNode01/servers/server1/
<jvmEntries xmi:id="JavaVirtualMachine_1183122130078" verboseModeClass="false" verboseModeGarbageCollection="false" verboseModeJNI="false" initialHeapSize="1024" maximumHeapSize="2048" runHProf="false" hprofArguments="" debugMode="false" debugArgs="-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=7777" genericJvmArguments="">
  <systemProperties xmi:id="Property_1" name="com.ibm.security.jgss.debug" value="off" required="false"/>
  <systemProperties xmi:id="Property_2" name="com.ibm.security.krb5.Krb5Debug" value="off" required="false"/>
</jvmEntries>
arthurdm commented 5 years ago

thanks @recena - did you set JAVA_TOOL_OPTIONS="-XX:+UseContainerSupport" somewhere? I was thinking the correct route is to set that flag which would let the JDK pick the right values.

arthurdm commented 5 years ago

hey @arturdzm - can you please investigate the best way we can set JAVA_TOOL_OPTIONS="-XX:+UseContainerSupport" in the base image?