'EC2 instance stops working after running supervisorctl update command laravel

So I just faced this issue second time. First time I stopped that instance and created a new one as I coudn't resove it but happend the same in the second instance.

I was working on the Laravel queue and had to make the jobs run automatically so as per their document below I followed the steps.

https://laravel.com/docs/8.x/queues#supervisor-configuration

As soon as I run the "sudo supervisorctl update" command the whole instance stops working. SSH is also stop working so not sure how to resolve this issue.

The installation of supervisor and adding the laravel-worker.conf file works fine. Also the "sudo supervisorctl reread" works fine but as soon I run the update command, the whole instance stops working.

Please help.

updaing the Laravel-worker

[program:laravel-worker]
process_name=%(program_name)s_%(process_num)02d
command=php /var/www/mydomain.com/artisan queue:work
autostart=true
autorestart=true
user=ubuntu
numprocs=8
redirect_stderr=true
stdout_logfile=/var/www/mydomain.com/worker.log​


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source