Skip to content

Commit

Permalink
Merge branch 'cherry-pick-f6845b54' into 'release/4.1'
Browse files Browse the repository at this point in the history
Cherry-pick branch 'wlstdocupdate' into 'release/4.1'

See merge request weblogic-cloud/weblogic-kubernetes-operator!4506
  • Loading branch information
rjeberhard committed Nov 16, 2023
2 parents 28c2a77 + 6fb4f74 commit 032b0ee
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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`,
Expand All @@ -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) ...
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 032b0ee

Please sign in to comment.