-
-
Notifications
You must be signed in to change notification settings - Fork 244
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
Replace nssm restart by powershell commands #282
Conversation
Very frequenty nssm commands (stop and start) fail because the service gets into STOP_PENDING or START_PENDING state. powershell commandlets such as restart-service have the good taste to wait for the service to stop/start completely.
I don't know too much about nssm to be honest. I did a little searching on the page and it seems like there are configurations where you can tweak some changes. |
/cc @Ginja since he wrote the Windows service provider. |
I haven't seen this too much in our environment. Have you tried playing with the restart delay option of NSSM, @kamaradclimber?
|
thanks @Ginja for you reply. As far as I understand the restart delay option it only deals with a delay between the service stop and the moment nssm tries to start it again. In my case, a simple restart command send to nssm is causing the state. It seems to be due to consul taking some time to stop (writing some information to disk) that might be long (a few seconds for a 2k node cluster) and nssm does not wait properly for process termination thus declaring the service as "stop pending". Apparently powershell commandlets handle this correctly. |
@kamaradclimber thanks for the clarification, that makes sense. I don't manage that large of a fleet in one Consul data centre, which probably would explain why I never ran into this issue. I just tested using those cmdlets locally & it looks like it'll work fine with NSSM. I'd say go ahead & merge this, @johnbellone. |
Replace nssm restart by powershell commands
thanks!
|
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Very frequenty nssm commands (stop and start) fail because the service
gets into STOP_PENDING or START_PENDING state.
powershell commandlets such as restart-service have the good taste to
wait for the service to stop/start completely.