kennethkalmer/daemon-kit — Issue #47: Starting daemon from Capistrano occasionally is successfull
Author: mirelabk
Created: 2012-02-21 17:52:36+00:00
State: open

Capistrano script in the rails project that uses daemonkit has following start and stop tasks:
task :start do
try_runner "RAILS_ENV=#{fetch(:rails_env)} DAEMON_ENV=#{fetch(:rails_env)} BUNDLE_GEMFILE=#{current_path}/Gemfile bundle exec #{current_path}/bin/#{daemon_name} start"
end
task :stop do
try_runner "cd #{current_path} && RAILS_ENV=#{fetch(:rails_env)} DAEMON_ENV=#{fetch(:rails_env)} bin/#{daemon_name} stop"
end

Stop task always runs successfully but start task just occasionally would start successfully. Even if it doesn't start, it never reports any problems. ssh debug log also doesn't show any issues.
Any idea about why would this be happening?
Thanks a lot.
Mirela