-
Notifications
You must be signed in to change notification settings - Fork 5
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
[Fix] Prevent container from getting stuck in restart loop #100
base: master
Are you sure you want to change the base?
Conversation
Without the added flag (`-Dpidfile.path=/dev/null`), the Docker container would get stuck in a reboot loop (with error `This application is already running (Or delete /srv/app/ot-platform-api-beta-latest/RUNNING_PID file).` after restarting the Docker service, e.g. when the system is rebooted.
@JarrodBaker Hi! Could you please review this? We still experience this issue with the currently used image ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR @romanhaa.
We haven't encountered this at Open Targets as we deploy the Docker container into a clean VM.
Are you providing a custom configuration file when you launch the container? According to the documentation you can address this issue within your configuration by including the field pidfile.path = "/dev/null"
.
Thanks for the feedback @JarrodBaker. We typically don't use a custom configuration, but I suppose that would be a better solution than modifying the launch command. I will test it. |
The previous non-array syntax invoked a shell to parse the commmand. The shell remained as process ID 1 and swallowed not just additional command-line arguments that might be useful to individual deployments, but also operating system signals such as the one to clean up for a graceful shutdown. This needless complexity occasionally caused small inconveniences such as pull request opentargets#100.
The previous non-array syntax invoked a shell to parse the commmand. The shell remained as process ID 1 and swallowed not just additional command-line arguments that might be useful to individual deployments, but also operating system signals such as the one to clean up for a graceful shutdown. This needless complexity occasionally caused small inconveniences such as pull request opentargets#100.
I haven't seen the intention to iterate on this in a year now, and Roman is no longer working at The Hyve. I think it's simplest to close this pull request, and if we ever want to get back to it, make another one with the new proposal. I don't have a close button though, can someone at EBI close it? |
Without the added flag (
-Dpidfile.path=/dev/null
), the Docker container would get stuck in a reboot loop (with errorThis application is already running (Or delete /srv/app/ot-platform-api-latest/RUNNING_PID file).
after restarting the Docker service, e.g. when the system is rebooted.Fix was taken from: https://stackoverflow.com/a/29244028