Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[6.0] Bug Redis queue #29969

Closed
it-can opened this issue Sep 12, 2019 · 5 comments
Closed

[6.0] Bug Redis queue #29969

it-can opened this issue Sep 12, 2019 · 5 comments

Comments

@it-can
Copy link
Contributor

it-can commented Sep 12, 2019

  • Laravel Version: 6.0.3
  • PHP Version: 7.3
  • Database Driver & Version: mariadb / Redis 5.0.5 / phpredis

Description:

I had a couple of queue jobs failed in Horizon (with redis) and when I resubmitted them via Horizon I got an error from Bugsnag. This wont stop until I restarted the Horizon worker...

https://github.com/laravel/framework/blob/6.x/src/Illuminate/Queue/RedisQueue.php#L230

/src/Illuminate/Queue/RedisQueue.php:230

[$job, $reserved] = $nextJob;
ErrorException Undefined offset: 1 
    /home/test/releases/341/vendor/laravel/framework/src/Illuminate/Queue/RedisQueue.php:230 Illuminate\Foundation\Bootstrap\HandleExceptions::handleError
    /home/test/releases/341/vendor/laravel/framework/src/Illuminate/Queue/RedisQueue.php:230 Illuminate\Queue\RedisQueue::retrieveNextJob
    /home/test/releases/341/vendor/laravel/framework/src/Illuminate/Queue/RedisQueue.php:169 Illuminate\Queue\RedisQueue::pop
    /home/test/releases/341/vendor/laravel/horizon/src/RedisQueue.php:92 Laravel\Horizon\RedisQueue::pop
    /home/test/releases/341/vendor/laravel/framework/src/Illuminate/Queue/Worker.php:264 Illuminate\Queue\Worker::getNextJob
    /home/test/releases/341/vendor/laravel/framework/src/Illuminate/Queue/Worker.php:118 Illuminate\Queue\Worker::daemon
    /home/test/releases/341/vendor/laravel/framework/src/Illuminate/Queue/Console/WorkCommand.php:112 Illuminate\Queue\Console\WorkCommand::runWorker
    /home/test/releases/341/vendor/laravel/framework/src/Illuminate/Queue/Console/WorkCommand.php:96 Illuminate\Queue\Console\WorkCommand::handle
    /home/test/releases/341/vendor/laravel/horizon/src/Console/WorkCommand.php:46 Laravel\Horizon\Console\WorkCommand::handle
    [internal] call_user_func_array
    /home/test/releases/341/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:32 Illuminate\Container\BoundMethod::Illuminate\Container\{closure}
    /home/test/releases/341/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:90 Illuminate\Container\BoundMethod::callBoundMethod
    /home/test/releases/341/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:34 Illuminate\Container\BoundMethod::call
    /home/test/releases/341/vendor/laravel/framework/src/Illuminate/Container/Container.php:591 Illuminate\Container\Container::call
    /home/test/releases/341/vendor/laravel/framework/src/Illuminate/Console/Command.php:192 Illuminate\Console\Command::execute
    /home/test/releases/341/vendor/symfony/console/Command/Command.php:255 Symfony\Component\Console\Command\Command::run
    /home/test/releases/341/vendor/laravel/framework/src/Illuminate/Console/Command.php:179 Illuminate\Console\Command::run
    /home/test/releases/341/vendor/symfony/console/Application.php:915 Symfony\Component\Console\Application::doRunCommand
    /home/test/releases/341/vendor/symfony/console/Application.php:272 Symfony\Component\Console\Application::doRun
    /home/test/releases/341/vendor/symfony/console/Application.php:148 Symfony\Component\Console\Application::run
    /home/test/releases/341/vendor/laravel/framework/src/Illuminate/Console/Application.php:90 Illuminate\Console\Application::run
    /home/test/releases/341/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php:131 Illuminate\Foundation\Console\Kernel::handle
    /home/test/releases/341/artisan:37 [main]
@driesvints
Copy link
Member

Hey there,

Can you first please try one of the support channels below? If you can actually identify this as a bug, feel free to report back and I'll gladly help you out and re-open this issue.

Thanks!

@it-can
Copy link
Contributor Author

it-can commented Sep 13, 2019

Mmm an other server / project now also gives the same error, without Horizon...

ErrorException · Undefined offset: 1
/home/test/current/artisan queue:work --memory=64 --delay=15

@it-can
Copy link
Contributor Author

it-can commented Sep 13, 2019

Seems to have changed with this commit 44860e5#diff-a91897fc4579ed0cb9b3c4f187e53372

maybe @halaei can take a look?

@it-can it-can changed the title [6.0] Bug Redis Horizon when a job is failed and resubmitted via Horizon [6.0] Bug Redis queue Sep 13, 2019
@halaei
Copy link
Contributor

halaei commented Sep 14, 2019

@it-can The commit is for Laravel 5.8. The only reason for your issue I can think of is that have recently you upgraded from laravel <= 5.7.* to 6.0 but forgot to terminate horizon. So some old code are executed by workers. If that is the case, it should go away after horizon:terminate / restarting workers.

@it-can
Copy link
Contributor Author

it-can commented Sep 14, 2019

@halaei no not the case, was a 5.8 project without horizon upgraded to 6.0 and added horizon. Also a other project upgraded from 5.8 to 6 without Horizon sometimes gives the same error...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants