My stack set-up consists of the following
Machine1 - Main Server (Running laravel)
Machine2 - MySql Server for the laravel codebase
Machine3 - Beanstalkd worker
I have setup Supervisord on Machine1 and added the following queue listener
[program:queue1]
command=php artisan queue:listen --queue=queue1 --tries=2
...
My laravel queue config file(app/config/queue.php) reads the following
'beanstalkd' => array(
'driver' => 'beanstalkd',
'host' => '--- Machine3 IP ---',
'queue' => 'queue1',
'ttr' => 60,
),
And I have installed beanstalkd on Machine3 along with Beanstalk console and can see my tasks being pushed to the queue and executing successfully. However I am not sure if Machine3 is actually executing them, and the reason for my suspicion is the High CPU usage on the main server as compared to no spikes in CPU usage on Machine3
I completely shutdown my beanstalkd Server to check if the queue still processes and the outcome was an error reported by laravel indicating it could not connect to the beanstalkd server.
I read somewhere that you need to have your laravel codebase on the beanstalkd server(Machine3) too, was that really the way to go?