Increasing shutdown timeout

Trond Endrestøl trond.endrestol at ximalas.info
Thu Oct 31 13:20:07 UTC 2019


On Thu, 31 Oct 2019 12:47+0100, Andrea Venturoli wrote:

> I'm having some problems on different servers with shutdown timeout.
> 
> For the curious, it ranges from bhyve VMs failing to stop (and keeping running
> as zombie, preventing real shutdown after init died), to NUT shutdown script
> not having the chance to run (so the UPS power won't get killed and the
> servers won't come up again unless all batteries are fully drained before the
> power comes back).
> 
> First: why not?
> Are there good reasons NOT to increase this timeout? Possible side effects?
> Any experience with an high value?

In my experience, the shutdown script(s) display more patience with a 
higher value.

> Second: how?
> I see there's "rcshutdown_timeout" that can be set in /etc/rc.conf, but also
> "kern.init_shutdown_timeout" sysctl.
> I read the latter is obsolete and not used since years. Seeing it there raises
> the doubt. Is it still valid?
> Should I increase both?

My version control system says I had to increase rcshutdown_timeout 
from 30 seconds to 60 seconds on 2011-02-28 for one of my systems, and 
again to 90 seconds on 2011-05-09. 90 seconds has been the default 
value since 2012-02-17.

Try setting rcshutdown_timeout to 120 seconds, or higher, i.e.:

rcshutdown_timeout="120"

-- 
Trond.


More information about the freebsd-questions mailing list