putting a check if a process exited #547
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Under restart the init script is stopping the process and starting it again.
When stopping it does not wait and issues a SIGTERM to the process, this causes trouble when the server was not able to shutdown within a minuscule time and a start is issued.
The same thing we encountered in production where under restart the server was not able to stop and a start was issued.
Logs:
[2018-01-30 15:40:45.198] nc.c:187 nutcracker-0.4.0 built for Linux 3.16.0-4-amd64 x86_64 started on pid 66313
[2018-01-30 15:40:45.199] nc.c:192 run, rabbit run / dig that hole, forget the sun / and when at last the work is done / don't sit down / it's time to dig another one
[2018-01-30 15:40:45.203] nc_stats.c:840 bind on m 4 to addr '0.0.0.0:15050' failed: Address already in use
Fix:
Waiting for the process to end and then issuing Kill if it does not stop.