Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

realtebo's avatar

Supervisor: how to avoid "FATAL Exited too quickly" ?

We have supervisor for handling queues, as most of us I think.

We have a TONS of small jobs, very very small, and about 2 M/days. In some edge cases, every single jobs ends near immediately because there is nothing to do.

Supervisor in this case pull down our queues because exited too quickly.,

Is there an option to tell supervisor to do not worry about this?

And... NO !!! We canno use tries = 0 because this causes ingestion in the server itself !

0 likes
6 replies
Snapey's avatar

supervisor is saying that your queue worker exited to quickly

this is NOT that your job ran to quickly

what is your supervisor config?

realtebo's avatar

@Snapey

[program:backend-multi-proc-worker]
process_name=%(program_name)s_%(process_num)02d
command=php /var/www/backend/artisan queue:work redis --queue=multi-proc --sleep=3 --tries=0 --max-time=300 --timeout=300
autostart=true
autorestart=true
stopasgroup=true
killasgroup=true
user=www-data
numprocs=8
redirect_stderr=true
startsecs = 0
stdout_logfile=/var/www/backend/storage/logs/worker-multi-proc.log
stopwaitsecs=3600

If all of my jobs are starting and finishing in a single millisecond, for example, then supervisor stop my worker with the fatal error. All jobs exited immediately but with 0 as exit code, because all is right

Did I understand it wrongly?

Sinnbeck's avatar

@realtebo Can you run that command manually in the terminal without errors?

php /var/www/backend/artisan queue:work redis --queue=multi-proc --sleep=3 --tries=0 --max-time=300 --timeout=300
realtebo's avatar

@Sinnbeck Of course, it do not has any erros. Like I said before, in some circumstances, all of my jobs terminates immediately, by code, and without errors. In this case, queue ends itself. but 'too fast' for supervisor, for what I understand

Snapey's avatar

@realtebo But when you start it from the command line, does it keep running (it should)

Please or to participate in this conversation.