josef.van.niekerk
josef.van.niekerk

Reputation: 12121

Laravel + Beanstalkd queue - buried jobs getting kicked

I'm using Laravel 4.1 with beanstalkd to run some intensive Photoshop PSD file processing in the background. I also installed phpBeanstalkdAdmin to monitor what's going on the queue.

The jobs being processed take around 7-10 minutes, but I've noticed that some of my jobs get restarted, even when they are still busy running.

Keeping an eye on phpBeanstalkdAdmin, I can see the job being buried when queue:listen picks up the job, but after a while it gets kicked back up, to ready.

To start the listening to the queue, I'm using:

$ ./artisan queue:listen --queue=my_queue --memory=512 --timeout=600

Inside the queue handler's fire() method, I'm simply starting an artisan command with

    Artisan::call(
        'tms:parse',
        [
            '--alias' => $data['alias'],
            '--notify' => $data['email']
        ]
    );

and calling

if ($job != null) {
    $job->delete();
}

once the job is done. But I can't figure out why it gets kicked to ready halfway through the job being busy.

Does Laravel kick the job back to ready after nothing happens to it in a preconfigured interval?

Upvotes: 1

Views: 970

Answers (1)

josef.van.niekerk
josef.van.niekerk

Reputation: 12121

Seems like this issue was resolved a while back, no one bothered updating the Laravel documentation however:

https://github.com/laravel/framework/pull/3766

Upvotes: 1

Related Questions