Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

super_simon123's avatar

Beanstalkd - the definitive thread?

Hello all, I am looking for some definitive advice on using Beanstalkd as a queuing system and there appears to be very little direction online and from the Laravel docs. I am using Laravel Forge.

I recently moved to Beanstalkd from sync/database to handle my queues as it looked like a solid option. The issue is, I don't know if I've configured it correctly, yet it appears to be working albeit it has failed to send some emails.

Can I just clarify if these steps are correct?

  1. .env file - QUEUE_CONNECTION=beanstalkd
  2. Installed Pheanstalk composer require pda/pheanstalk ~4.0 as written here: https://laravel.com/docs/10.x/queues#other-driver-prerequisites
  3. Dispatch jobs within the code as expected:
public function sendEmail()
{
	//
	SendEmailJob::dispatch();
	//
}

The issue is when it comes to actually listening to the queue... running on a local environment, I just run php artisan queue:work and it chugs away. But it doesn't appear this straightforward on Forge as some emails don't appear to send every time.

On Forge I go to the mysite.com > Queue and then define a worker status.

Once this is up and running, do I need to fire php artisan queue:work again? Or do I run it with the --once flag? And at one point do I need to run php artisan queue:restart? Do I need to restart the worker or the queue every time I deploy? There's so much conflicting information online but none of it seems to be in a consistent order.

Thank you so much for your help

0 likes
0 replies

Please or to participate in this conversation.