Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Laravel 4.1 mail queueing with beanstalkd driver - "Insufficient data for unserializing"

I'm working on my first Laravel app, and hit an odd problem when trying to queue up email sending using Mail::queue to send emails.

I was originally using the sync driver and everything worked fine, however having now switched over to the beanstalkd driver it's stopped sending my emails.

My config is as follows:

  • Ubuntu 13.10
  • Laravel 4.1
  • PHP 5.5.3
  • Beanstalkd 1.8 installed via apt-get
  • "pda/pheanstalk": "2.1.*" in composer.json

What I've noticed is that every time I run

$ php artisan queue:work

I'm getting:

  [ErrorException]                                                  
  Insufficient data for unserializing - 2570 required, 168 present  


queue:work [--queue[="..."]] [--delay[="..."]] [--force] [--memory[="..."]] [--sleep[="..."]] [--tries[="..."]] [connection]

I've tried selecting the redis driver and that wasn't giving me the error, so clearly there is something wrong with how pheanstalk is running on my machine.

I've tried changing the pheanstalk version in composer.json, but I'm still getting the same problem no matter which version I seem to use.

Problem is, this issue doesn't seem particularly widely documented, and the error message doesn't really give much away at all...

Any suggesions?

like image 954
Jonathan Ellis Avatar asked Nov 11 '22 10:11

Jonathan Ellis


1 Answers

Check this response: https://stackoverflow.com/a/28226746/1427439

You might be having the same issue.

Basically, make sure you're not using any Eloquent models with the closure you are passing to Mail::queue

like image 155
Maxime Rainville Avatar answered Nov 14 '22 23:11

Maxime Rainville