Skip to content

OWLS-93551: Changes to expose the server startup properties and add -XX:+CrashOnOutOfMemoryError to JAVA_OPTIONS. #3706

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Dec 1, 2022

Conversation

ankedia
Copy link
Member

@ankedia ankedia commented Nov 30, 2022

OWLS-93551 - Changes to expose the RestartMax and RestartInterval server startup properties through environment variables and add -XX:+CrashOnOutOfMemoryError to the Node Manager and WebLogic server java command line.

Integration test run - https://build.weblogick8s.org:8443/job/weblogic-kubernetes-operator-kind-new/14243/

…roperties and add `-XX:+CrashOnOutOfMemoryError` to JAVA_OPTIONS.
@oracle-contributor-agreement oracle-contributor-agreement bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label Nov 30, 2022

WebLogic Server provides a self-health monitoring feature to improve the reliability and availability of server instances in a domain. If an individual subsystem determines that it can no longer operate consistently and reliably, it registers its health state as `FAILED` with the host server. Each WebLogic Server instance, in turn, checks the health state of its registered subsystems to determine its overall viability. If one or more of its critical subsystems have reached the `FAILED` state, the server instance marks its health state as `FAILED` to indicate that it cannot reliably host an application.

Using Node Manager, server self-health monitoring enables the automatic restart of the failed server instances. The operator configures the Node Manager to restart the failed server two times within a one-hour interval. It does this by setting the value of the `RestartMax` property (in the [server startup properties](https://docs.oracle.com/en/middleware/fusion-middleware/weblogic-server/12.2.1.4/nodem/java_nodemgr.html#GUID-26475256-2830-434B-B31F-A2D06F48B244) file) to `2` and the value of the `RestartInterval` property to `3600`. You can change the number of times the Node Manager will attempt to restart the server in a given interval by setting the `RESTART_MAX` and `RESTART_INTERVAL` environment variables in the domain resource using the `env` attribute under the `serverPod` element.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the failed server two times -> the failed server a maximum of two times

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed.

@@ -286,6 +286,7 @@ if [[ "${KUBERNETES_PLATFORM^^}" == "OPENSHIFT" ]]; then
fi

fi
JAVA_OPTIONS="-XX:+CrashOnOutOfMemoryError $JAVA_OPTIONS"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assume this may need an "export"?

Copy link

@tbarnes-us tbarnes-us Nov 30, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, shall we provide a way to remove this "-XX" just in case it has an unancticipated problem? As in something like:

export JAVA_OPTIONS="${JAVA_XX_OPTIONS:--XX:+CrashOnOutOfMemoryError} $JAVA_OPTIONS"

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point, changed. Thanks.

@ankedia ankedia marked this pull request as ready for review November 30, 2022 13:34
Copy link
Contributor

@rosemarymarano rosemarymarano left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One edit required in the section heading, otherwise ok.

@@ -78,6 +78,26 @@ The following operator-populated environment variables are available for use in

* A custom liveness probe must not fail (exit non-zero) when the WebLogic Server instance itself is unavailable. This could be the case when the WebLogic Server instance is booting or about to boot.

### Automatic Restart of Failed Server Instances by Node Manager
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automatic Restart of Failed Server Instances by Node Manager -> Automatic restart of failed server instances by Node Manager

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed in a1b5893. Thanks.

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@rjeberhard rjeberhard merged commit c86b133 into main Dec 1, 2022
@rjeberhard rjeberhard deleted the OWLS-93551 branch December 1, 2022 12:27
rjeberhard pushed a commit to rjeberhard/weblogic-kubernetes-operator that referenced this pull request Apr 14, 2023
…-XX:+CrashOnOutOfMemoryError` to JAVA_OPTIONS. (oracle#3706)

* Changes to expose the RestartMax and RestartInterval server startup properties and add `-XX:+CrashOnOutOfMemoryError` to JAVA_OPTIONS.
robertpatrick pushed a commit that referenced this pull request Apr 26, 2023
…-XX:+CrashOnOutOfMemoryError` to JAVA_OPTIONS. (#3706)

* Changes to expose the RestartMax and RestartInterval server startup properties and add `-XX:+CrashOnOutOfMemoryError` to JAVA_OPTIONS.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OCA Verified All contributors have signed the Oracle Contributor Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants