2

My working are failing with a spawn error:

2018-02-08 13:05:38,704 INFO exited: example-worker_00 (exit status 255; not expected)
2018-02-08 13:05:39,706 INFO gave up: example-worker_00 entered FATAL state, too many start retries too quickly

This is supervisor version 3.2.0 (latest available with apt-get) on Ubuntu 16.04.

Here is my worker conf:

[program:example-worker] /etc/supervisor/conf.d/example-worker.conf
process_name=%(program_name)s_%(process_num)02d
command=php /home/forge/example.com/artisan queue:work sqs --sleep=3 --tries=100 --daemon --queue=example-queue --timeout=290
autostart=true
autorestart=true
startretries=2
user=forge
numprocs=2
logfile_maxbytes=10240
logfile_backups=1
redirect_stderr=true
stdout_logfile=/home/forge/example.com/storage/logs/workers/example-worker.log

I tried adding startretries=2 because of the too many start retries too quickly part of the error as others have suggested, but that did not help.

Is there something wrong with my config? From what I can tell, this one looks the same as the workers that are starting successfully.

2
  • 1
    Your program fails to start entirely. Check your paths are correct. Feb 8, 2018 at 21:38
  • That was the problem! The ones that were starting successfully had an extra part to the directory path.
    – eComEvo
    Feb 8, 2018 at 21:40

2 Answers 2

1

I also had the same error. I noticed that there was a directory error. Re-check the directory (/app) where command should be executed.

# Queue Worker
[program:queue-worker]
command=/usr/local/bin/php /app/artisan queue:work --tries=3
directory=/app
autostart=true
autorestart=true
startretries=3
user=www
stderr_logfile=/app/storage/logs/supervisor.err.log
stdout_logfile=/app/storage/logs/supervisor.out.log


0

I had the same problem. I found the user in my conf has not permission to write the log.

[root@ecs-gz-sdk01 logs]# php /data/www/demo/artisan queue:work redis --sleep=3 --tries=3
[2019-11-19 15:39:25] Processed: App\Jobs\DoSth
[root@ecs-gz-sdk01 logs]# su www
[www@ecs-gz-sdk01 logs]$ php /data/www/demo/artisan queue:work redis --sleep=3 --tries=3
[www@ecs-gz-sdk01 logs]$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .