Remote beanstalkd Laravel 4.2 setup
My stack setup consists of the following:
- www.main.com - Main Server (Main Application Code and Supervisor)
- www.queue-server.com - Beanstalkd is installed here (no code here only beanstalkd)
I am using Laravel 4.2 .
I have a Supervisor setup at www.main.com and added the following queue listener:
php artisan queue:work--queue=test --env=test
My app/config/queue.php
file settings :
'beanstalkd' => array(
'driver' => 'beanstalkd',
'host' => 'www.queue-server.com',
'queue' => 'test',
'ttr' => 60,
),
From my point of view, it should start and process jobs on the server www.queue-server.com
, but there are no CPU spikes, but the server is www.main.com
showing high CPU usage.
So my questions are:
- Is my installation configured correctly? Or should I change something?
- I want to process my work on the server
www.queue-server.com
. How can I achieve this?
source to share
The beanstalkd server is just a queue data store, it doesn't process. His command php artisan queue:work
, which then processes the queue. This is why you are seeing a higher load on the server www.main.com
, since your queue is stored on another server, the main server is the one that is currently processing the queue.
If you want the server to www.queue-server.com
handle the queue, you also need to install the application and run the artisan command.
source to share