Skip to content
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

Pricenode: Add JVM flag ExitOnOutOfMemoryError #6230

Merged
merged 2 commits into from
May 31, 2022
Merged

Pricenode: Add JVM flag ExitOnOutOfMemoryError #6230

merged 2 commits into from
May 31, 2022

Conversation

alkum
Copy link
Contributor

@alkum alkum commented May 31, 2022

Add flag that causes the JVM to exit with exit code 3 whenever there is an OutOfMemory exception for the pricenode service, which causes the systemd bisq-pricenode service to restart.

Can be tested by running the pricenode on a VM with very little memory, or by artificially limiting the JVM memory in addition to this flag: -Xmx10m -XX:+ExitOnOutOfMemoryError. The tests should result in an endless restart cycle for the pricenode service (sudo systemctl status bisq-pricenode should show service uptime of max 1-2 seconds each time it's called).

Fixes #6225

Add flag that causes the JVM to exit with exit code 3 whenever there is an OutOfMemory exception.
@boring-cyborg
Copy link

boring-cyborg bot commented May 31, 2022

Thanks for opening this pull request!

Please check out our contributor checklist and check if Travis or Codacy found any issues with your PR. Also make sure your commits are signed, and that you applied Bisq's code style and formatting.

A maintainer will add an is:priority label to your PR if it is up for compensation. Please see our Bisq Q1 2020 Update post for more details.

@ghost
Copy link

ghost commented May 31, 2022

You could do the same for seednode, to resolve issue #6225.

# configuration for bisq service
# install in /etc/default/bisq.env
# java home, set to openjdk 10
JAVA_HOME=/usr/lib/jvm/openjdk-10.0.2
# java memory and remote management options
JAVA_OPTS="-Xms4096M -Xmx4096M"

Flag ensures the seednode exists with error code 3 when an OutOfMemory exception happens.
@alkum
Copy link
Contributor Author

alkum commented May 31, 2022

Done.

Copy link
Contributor

@ripcurlx ripcurlx left a comment

Choose a reason for hiding this comment

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

utACK

@ripcurlx ripcurlx added this to the v1.9.2 milestone May 31, 2022
@ripcurlx ripcurlx merged commit 8805316 into bisq-network:master May 31, 2022
@boring-cyborg
Copy link

boring-cyborg bot commented May 31, 2022

Awesome work, congrats on your first merged pull request!

@wiz
Copy link
Contributor

wiz commented May 31, 2022

Thank you 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bisq seednode exits cleanly on fatal error, causing systemd to not automatically restart it
3 participants