I stumbled upon a strange thing using Laravel horizon with supervisor.
I'm getting a strange infinite loop over a job which keep failing. I don't know if its my supervisor configuration that is wrong. Here you can see the horizon log.
My supervisor configuration is like this:
[program:daemon-758131]
command=php /home/forge/******/artisan horizon
process_name=%(program_name)s_%(process_num)02d
autostart=true
autorestart=true
user=forge
numprocs=1
startsecs=1
redirect_stderr=true
stdout_logfile=/home/forge/*******/storage/logs/horizon.log
stopwaitsecs=3600
stopsignal=SIGKILL
stopasgroup=true
killasgroup=true
If i take a look at my supervisor status i got this:
And my horizon configuration is like this in my code, (i've created a new supervisor for long running processes):
'environments' => [
'production' => [
'supervisor-1' => [
'maxProcesses' => 10,
'balanceMaxShift' => 1,
'balanceCooldown' => 3,
],
'supervisor-long-running' => [
'connection' => 'redis-long-running',
'queue' => 'audio-converter',
'balance' => 'simple',
'processes' => 2,
'tries' => 1,
'timeout' => 30
]
],
And in my queue config:
'redis-long-running' => [
'driver' => 'redis',
'connection' => 'default',
'queue' => 'audio-converter',
'retry_after' => 30,
'block_for' => null,
],
This job is not even present in the laravel scheduler.
Funny thing is that i have another job for notifications and it is working good, it is not spawned like this job.
I'm getting crazy at this strange thing. Maybe someone can help me? thanks!!
I've tried to change the supervisor configuration, change the queues , flush the queues, flush redis db etc..
The job is connecting to an external API, it take around 2 min generally to complete.