4

Horizon runs fine but only recently, after a deploy, supervisor and queue workers do not start back up again with Horizon GUI showing "Inactive"

To get them running again I can:

  • restart the daemon worker from within forge
  • restart the supervisor /etc/init.d/supervisor restart

My deploy script has php artisan horizon:terminate within it. I have also tried reset/purge and a combination thereof.

When I run terminate in the command with an inactive horizon, it seems to do nothing. When I run the same command with horizon active, it shuts it down but the daemon does not reboot supervisor.

The daemon runs without any errors throughout all of this.

Should terminate take down and bring up the service or is it the daemon itself?

Adam Lambert
  • 1,311
  • 3
  • 24
  • 45

1 Answers1

7

Running horizon:terminate will kill the daemon, when the daemon is killed supervisor will realize this and boot up a new daemon. You can clearly see this if you monitor your server with htop while running terminate command.

If a long running job is running, it will run the current job until it finishes. Terminate in general is to reboot the process, to be certain the new code is loaded into horizon, this should be done after the last step in envoyer or similar deployment tool.

This seems like there is something wrong in your setup. Does the horizon process run before you call terminate, again check htop?. Or what happens when the command is called manually?

mrhn
  • 17,961
  • 4
  • 27
  • 46