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

Graceful shutdown of EAP 7 server during restart (or scale down in VMSS template) #25

Open
mnovak1 opened this issue Sep 24, 2021 · 0 comments

Comments

@mnovak1
Copy link
Collaborator

mnovak1 commented Sep 24, 2021

In case that VM with EAP 7 is stopped then EAP 7 must be shutdown gracefully not to have unfinished transactions. This is espcially important during scale down in VMSS template as it might leave data in bad state.

Graceful shutdown will cause that EAP 7 will stop all incoming http requests, will not trigger any EJB3 times and MDBs will stop processing messages. It will also wait for all processing requests/transactions to be finished.

As EAP 7 is started as a service and systemctl stop eap7-standalone.service will just stop the service immediately the unit file /etc/systemd/system/multi-user.target.wants/eap7-standalone.service needs to be adjusted by:

...
[Service]
ExecStop=/opt/rh/eap7/root/usr/share/wildfly/bin/jboss-cli.sh --connect --command=":shutdown(timeout=300)"
...

This will cause that it will wait 300 seconds for EAP7 to be stopped gracefully. It might be possible to configure it to wait forever which might be wise for VMSS template.

However it's just the first step. Another things is how to tell RHEL 8 to wait until eap7-standalone.service is stopped. Possible solution might be to use: https://www.commandlinux.com/man-page/man1/systemd-inhibit.1.html which would block system shutdown until EAP 7 process is running.

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

No branches or pull requests

1 participant