You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a Docker container is stopped via docker stop or docker restart, SIGTERM is sent to pid 1. The container is given a limited time (default 10 s) to shut down before a SIGKILL is issued. REMReM Publish fails to respond to the SIGTERM signal since pid 1 is the bash process running start-service.sh so you have to wait around for the SIGKILL. We should make sure the Tomcat JVM becomes pid 1 to speed up shut downs and allow the process to clean up. It's probably enough to change
/eiffel/health-check.sh && catalina.sh run
in start-service.sh to:
/eiffel/health-check.sh && exec catalina.sh run
Benefits
Quicker container shutdowns (and therefore restarts) reduce downtime and is less of a PITA when testing the container. Also, if we want to hook into the SIGTERM and perform some kind of cleanup we have to make this change since the eventual SIGKILL signal can't be trapped.
Possible Drawbacks
None.
The text was updated successfully, but these errors were encountered:
Unfortunately the patch described above isn't enough. There's a lot of stuff going on in catalina.sh and the JVM ends up as pid 10 or so. If we drop the external Tomcat as suggested in eiffel-community/eiffel-remrem-generate#142 I suspect this issue will solve itself.
Description
When a Docker container is stopped via
docker stop
ordocker restart
, SIGTERM is sent to pid 1. The container is given a limited time (default 10 s) to shut down before a SIGKILL is issued. REMReM Publish fails to respond to the SIGTERM signal since pid 1 is the bash process running start-service.sh so you have to wait around for the SIGKILL. We should make sure the Tomcat JVM becomes pid 1 to speed up shut downs and allow the process to clean up. It's probably enough to changein start-service.sh to:
Benefits
Quicker container shutdowns (and therefore restarts) reduce downtime and is less of a PITA when testing the container. Also, if we want to hook into the SIGTERM and perform some kind of cleanup we have to make this change since the eventual SIGKILL signal can't be trapped.
Possible Drawbacks
None.
The text was updated successfully, but these errors were encountered: