From 6fb4f74dce494eb2ad90b5a800d4f4447ecb89e8 Mon Sep 17 00:00:00 2001 From: Ryan Eberhard Date: Thu, 16 Nov 2023 19:51:37 +0000 Subject: [PATCH] Cherry-pick branch 'wlstdocupdate' into 'release/4.1' --- .../accessing-the-domain/wlst.md | 22 ++++++++++++++++++- .../managing-domains/domain-on-pv/overview.md | 5 +++++ 2 files changed, 26 insertions(+), 1 deletion(-) diff --git a/documentation/site/content/managing-domains/accessing-the-domain/wlst.md b/documentation/site/content/managing-domains/accessing-the-domain/wlst.md index c0290dac472..41e0a20c035 100644 --- a/documentation/site/content/managing-domains/accessing-the-domain/wlst.md +++ b/documentation/site/content/managing-domains/accessing-the-domain/wlst.md @@ -25,6 +25,26 @@ You can use the `kubectl exec` command to start an interactive WLST session within a pod or to remotely run a WLST script on a pod. Typically, this is the preferred method. +**NOTE**: The WLST script uses the value of the environment variable `USER_MEM_ARGS` to control the heap settings of the JVM process. If you have set the environment variable +`USER_MEM_ARGS` in the domain resource YAML, the WLST process will inherit the memory settings. For example, +if you have `USER_MEM_ARGS` value set to `-Xms2048m -Xmx2048m`, the WebLogic server JAVA process will use this heap settings, and if you run the WLST script in the server pod, +the WLST script JAVA process will also use this heap settings. This may cause unexpected behavior in the server pod due to additional memory usage. + +In order to change the memory settings, you must do the following + + +```shell +USER_MEM_ARGS="" $ORACLE_HOME/oracle_common/common/bin/wlst.sh +``` +This will unset the `USER_MEM_ARGS` and let the WLST to use the default heap size `-Xms32m -Xmx1024m`, and this only affect the WLST script process. + +If you want to use different memory settings, you can adjust it by + +```shell +USER_MEM_ARGS="-Xms128m -Xmx128m" $ORACLE_HOME/oracle_common/common/bin/wlst.sh +``` + + For example, if a `domainUID` is `sample-domain1`, its Administration Server is named `admin-server` and is configured with default port `7001`, and its pods are running in namespace `sample-domain1-ns`, @@ -34,7 +54,7 @@ then you can start an interactive WLST session this way: $ kubectl -n sample-domain1-ns exec -it sample-domain1-admin-server /bin/bash -[oracle@sample-domain1-admin-server oracle]$ wlst.sh +[oracle@sample-domain1-admin-server oracle]$ USER_MEM_ARGS="" $ORACLE_HOME/oracle_common/common/bin/wlst.sh Initializing WebLogic Scripting Tool (WLST) ... diff --git a/documentation/site/content/managing-domains/domain-on-pv/overview.md b/documentation/site/content/managing-domains/domain-on-pv/overview.md index 51dcabe6508..50616e4e60d 100644 --- a/documentation/site/content/managing-domains/domain-on-pv/overview.md +++ b/documentation/site/content/managing-domains/domain-on-pv/overview.md @@ -26,6 +26,11 @@ The `initializeDomainOnPv` section: - Creates the RCU schema, if needed. - Creates the WebLogic domain home on the persistent volume based on the provided WDT models. +{{% notice note %}} +If you are running WebLogic Scripting Tool (WLST) inside a server pod, then +please refer to [Use kubectl exec]({{< relref "/managing-domains/accessing-the-domain/wlst#use-kubectl-exec">}}) in the WLST documentation for very important information related to memory usage. +{{% /notice %}} + ### High-level use case The typical Domain on PV use case is for an application life cycle that requires persisting changes to the permanent file system.