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

[Fix] Prevent container from getting stuck in restart loop #100

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

romanhaa
Copy link

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-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

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.
@romanhaa
Copy link
Author

romanhaa commented Jul 4, 2022

@JarrodBaker Hi! Could you please review this? We still experience this issue with the currently used image (dev22.06.3).

@JarrodBaker JarrodBaker self-requested a review July 6, 2022 13:17
Copy link
Contributor

@JarrodBaker JarrodBaker left a 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".

@romanhaa
Copy link
Author

romanhaa commented Jul 6, 2022

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.

fedde-s added a commit to thehyve/platform-api that referenced this pull request Nov 4, 2022
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.
fedde-s added a commit to thehyve/platform-api that referenced this pull request Nov 7, 2022
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.
@fedde-s
Copy link
Contributor

fedde-s commented Aug 15, 2023

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?

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.

3 participants