Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Replace nssm restart by powershell commands #282
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.