Skip to content

What is start_timeout, start_grace, stop_timeout, ...

kostya edited this page Dec 23, 2014 · 2 revisions

_timeout is a time for command execution.

_grace is a sleep after command execution.

for daemonize true:

start_timeout not used, use start_grace to emulate some delay before process will be considered fully up, to stay in state :starting (some web server for example):

  pid_file "/tmp/1.pid"
  start_command "ruby some_web_server.rb"
  daemonize true
  start_grace 10.seconds

for daemonize false

start_timeout is a timeout for command self-daemonization, command should daemonize process and then die in 10 seconds.

  pid_file "/tmp/1.pid"
  start_command "ruby some_web_server.rb -d --pid_file '/tmp/1.pid'"
  start_timeout 10.seconds
  start_grace 2.seconds

for stop and restart, the same:

  stop_command "ruby some_ruby_stop_script.rb"
  stop_timeout 10.seconds
  stop_grace 5.seconds
  restart_command "ruby some_ruby_restart_script.rb"
  restart_timeout 10.seconds
  restart_grace 5.seconds