Well, I'm still not 100% sure what was going on, but its possible that the problem wasn't Horizon, and was instead due to different redis prefixes being used. After setting both of my servers to use the same redis prefix (in the .env file, set REDIS_PREFIX), and after a bunch of other stuff, including restarting horizon, clearing all caches, and manually flushing the redis DB, it finally started working.
Horizon jobs paused
Hey All,
We're using Forge and have two servers that both push jobs (for multiple queues) to a single ElastiCache (redis) endpoint. Server one is configured (config/horizon.php) to process specific queues, and server two is configured to process others. The horizon dashboard shows all of the machines, supervisors, queues, and jobs, but horizon just won't process them! They sit in the queue and never complete. If I look at the Recent Jobs tab in the horizon dashboard it shows the jobs in "paused" mode. I've tried different configurations, including using a unique redis prefix for each machine, and also using the same redis prefix for each, but with the same results. I've run horizon:terminate and restarted it after every code and config change. What is the proper configuration for horizon to be run on multiple servers all using the same redis db? My configs look like this:
SERVER 1
[
'prefix' => 'horizon:',
'environments' => [
'production' => [
'server1-supervisor-prod1' => [
'connection' => 'redis',
'queue => ['email'],
'balance' => 'simple',
'tries' => 1,
],
],
],
]
SERVER 2
[
'prefix' => 'horizon:',
'environments' => [
'production' => [
'server2-supervisor-prod1' => [
'connection' => 'redis',
'queue => ['default', 'foo', 'bar'],
'balance' => 'auto',
'minProcesses' => 5,
'maxProcesses' => 30,
'tries' => 3,
],
],
],
]
Any ideas or tips are greatly appreciated!
Please or to participate in this conversation.