-
Notifications
You must be signed in to change notification settings - Fork 816
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
Validate torchserve process in pid file before starting #1866
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1866 +/- ##
==========================================
- Coverage 45.13% 44.99% -0.14%
==========================================
Files 63 63
Lines 2601 2609 +8
Branches 60 60
==========================================
Hits 1174 1174
- Misses 1427 1435 +8
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
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.
looks good
Could you please add some detail as to how you verified this fix worked? |
@msaroufim updated the PR description to reflect the details |
* validate torchserve process in pid file before starting * remove unrequired if statement
* validate torchserve process in pid file before starting * remove unrequired if statement
Just to let you know that I have the same kind of issue on Windows server 2019, with TorchServe 0.7.1. From Anaconda Prompt (ran as admninistrator), I run I guess the SIGINT is not catched by |
Description
Fixes #1862 - There's an edge case where if
.model_server.pid
file is not deleted when torchserve stops abruptly and another process with same pid is started before torchserve is attempted to start again at which point it falsely assumes that the new pid of another process is torchserve process and exits with message"TorchServe is already running, please use torchserve --stop to stop TorchServe."
This additional check validates that the process is actually a torchserve process and if not it will start torchserve.Testing: