You do not have to run the queue worker first, supervisor will start it up when it's not running.
I compared what you posted to the contents of my supervisor config file - two difference stand out:
-
You're configuring it to run as user=root whereas I am using a non-root user; as long as your supervisord is running as root (which it looks like it is since you are sudoing) than this is probably not a problem...
-
You have configured your queue worker to use AWS SQS to manage the queue ; do you have SQS properly configured to do that, or did you intend to use a database for the queue jobs? Mine looks like:
command=php /path/to/app/artisan queue:work database --sleep=3 --tries=3
What's the output of supervisorctl status? You should see something like:
dipasquo@ip-10-0-0-157:/app$ sudo supervisorctl status
[sudo] password for dipasquo:
queue-worker:queue-worker_00 RUNNING pid 2380, uptime 15:18:15
queue-worker:queue-worker_01 RUNNING pid 2384, uptime 15:18:14
If you don't see that, do you see any complaints in /var/log/supervisor/supervisord.log?
Do you see artisan processes running?, e.g.
dipasquo@ip-10-0-0-157:~$ ps auwwx | grep artisan
www-data 2380 0.0 1.8 304552 38376 ? S May01 0:18 php /path/to/app/artisan queue:work database --sleep=3 --tries=3
www-data 2384 0.0 1.8 304552 38408 ? S May01 0:18 php /path/to/app/artisan queue:work database --sleep=3 --tries=3