Skip to content
This repository has been archived by the owner on Oct 17, 2021. It is now read-only.

Sometimes resque:scheduler:restart doesnt kill active process, instead it spawns new one #107

Open
ruslansavenok opened this issue Dec 17, 2015 · 1 comment

Comments

@ruslansavenok
Copy link

When running cap develop resque:scheduler:restart, sometimes it doesnt kill active process from pid, instead it spawns new one. Server is running on ubuntu 14

capistrano - 3.4.0
capistrano-resque - 0.2.2
resque - 1.25.2

ps aux | grep resque-scheduler-4.0.0
root      6137  0.0  0.3 1063524 119632 ?      Sl   Dec16   0:10 resque-scheduler-4.0.0[server_production]: Processing Delayed Items
root      9200  0.0  0.3 1055524 111196 ?      Sl   02:34   0:00 resque-scheduler-4.0.0[server_develop]: Schedules Loaded
root     13567  0.0  0.3 1055560 111424 ?      Sl   02:35   0:00 resque-scheduler-4.0.0[server_develop]: Schedules Loaded
root     18716  0.0  0.3 1054792 112568 ?      Sl   02:36   0:00 resque-scheduler-4.0.0[server_develop]: Schedules Loaded
root     24277  0.0  0.3 1055884 111696 ?      Sl   02:31   0:00 resque-scheduler-4.0.0[server_develop]: Schedules Loaded
root     24977  0.0  0.3 1055080 110952 ?      Sl   02:37   0:00 resque-scheduler-4.0.0[server_develop]: Schedules Loaded
root     25345  0.0  0.0  11848   932 pts/4    S+   02:37   0:00 grep --color=auto resque-scheduler-4.0.0
@Joachim-42he
Copy link

Same with capistranoe-resque 0.2.3.

Posible reason for resque:scheduler:restart to fail:
Capistrano-resque stops the scheduler with

execute :kill, "-s #{fetch(:resque_kill_signal)} $(cat #{pid}); rm #{pid}"

(capistrano-resque.rake:144)

:resque_kill_signaldefaults to SIGQUITSince the return of kill is not read, even if it fails, the PIDfile is removed and a new process will be started (with a new PIDfile).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants