Sample Header Ad - 728x90

Reducing shutdown timeout for "a stop job is running"

29 votes
2 answers
70500 views
I've got node.js and pm2 installed on a Pi (Raspbian). PM2 was configured to start via pm2 startup and the init scripts it creates. Sometimes when I reboot, shutdown hangs for a few minutes on: A stop job is running for LSB: PM2 init script (... / 5min) Every once in a while1 what I'm assuming is PM2 doesn't shut down properly and hangs for the full 5 minutes. On this system, I know exactly what apps PM2 is managing and I really don't care if they shutdown properly. My question is: How do I reduce the timeout from 5 minutes to, say, 15 seconds or so? Where is this configured? I read on a forum that it was the DefaultTimeoutStopSec key in */etc/systemd/system.conf*, so I tried setting that to "15s" but it had no effect. I tried the same thing in */etc/systemd/user.conf*, too, but no change. The timeout is still set to 5 minutes. --- 1 I actually do know specifically what triggers this, but the details aren't important and the effect is unavoidable.
Asked by Jason C (1585 rep)
Dec 6, 2016, 02:02 AM
Last activity: Dec 30, 2016, 11:02 AM