Search code examples
phplaravelqueuelaravel-forgepheanstalk

JOB_TOO_BIG Pheanstalk - what can be done?


On Laravel 4.2 & Laravel Forge

I Made a mistake and accidentally pushed some code on to the production sever, but there was a bug and it pushed a job to the queue without deleting it once done. Now I can't push anything in the queue anymore, I get:

Pheanstalk_Exception JOB_TOO_BIG: job data exceeds server-enforced limit

What can I do?


Solution

  • This is because you're trying to store too much data in the queue itself. Try to cut down the data you're pushing to the queue.

    For example if your queue job involves using models, just pass the model ID into the queue and as part of the job fetch them from the database, rather than passing the queue the entire model instance.

    If you're using eloquent models, they're automatically handled in this way.