-
Notifications
You must be signed in to change notification settings - Fork 101
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
Warn instead of failing when stale pid successfully removed #5991
Conversation
Leaving @will-moore to comment, but I'd agree that if the pid isn't running, there's not much the user can do (as opposed to the other "stale" error in the file). |
I haven't tested functionality locally, but agree that it's nicer to remove |
The functional impact of this one is minimal, so I can see getting it in. @will-moore, in general though, it would be good to have you set up for production locally, both for these reviews as well as for testing your apps in a more realistic scenario. If that's doable in time for testing this, that'd be great. |
OK, so I'm running nginx as described https://docs.openmicroscopy.org/omero/5.4.10/developers/Web/Deployment.html
Then I kill -9 pid (I think this is the parent ID) and see that the parent is gone but the others are still there
As expected, start fails
Then I checked out this PR and web started OK
I tried to repeat this, just to check again but.... this time ALL the gunicorn processes died (which is kinda what I expected to happen first time
And now web doesn't restart
So, I can run "production" web locally 👍 but not sure I'm testing this PR right? |
Using the container from ome/omero-web-docker#29 I see the same behavior @will-moore was referring to:
The second run does start up:
|
If I kill all of the processes, then it works as expected. In a fresh container:
|
This PR will only work if all processes were killed, for instance an unclean shutdown. If for whatever reason |
Understood. If that's the expected behavior, 👍 |
If a stale django PID file is found and successfully removed continue to start OMERO.web instead of dieing: https://trello.com/c/nYsytx1P/295-omeroweb-doesnt-start-if-an-old-djangopid-file-is-present
Testing:
omero web start
ps -ef
to find Gunicorn parent PID,kill -9 <Gunicorn parent pid>
,ps -ef
to verify all Gunicorn processes were killed)omero web start
should output a warning, then continue to start: