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

Processing a Redis queue causes ERR wrong number of arguments for 'rpush' command #6140

Closed
danwdart opened this issue Oct 17, 2014 · 5 comments

Comments

@danwdart
Copy link

Looks like when processing a queue I got a tonne of these which filled up my disk:

[2014-10-17 14:09:09] cli.ERROR: exception 'Predis\Transaction\AbortedMultiExecException' with message 'ERR wrong number of arguments for 'rpush' command' in /var/www/viewex/vendor/predis/predis/lib/Predis/Transaction/MultiExecContext.php:219
Stack trace:
#0 /var/www/viewex/vendor/predis/predis/lib/Predis/Transaction/MultiExecContext.php(195): Predis\Transaction\MultiExecContext->executeCommand(Object(Predis\Command\ListPushTail))
#1 [internal function]: Predis\Transaction\MultiExecContext->__call('rpush', Array)
#2 [internal function]: Predis\Transaction\MultiExecContext->rpush('queues:default', '{"job":"\Viewe...', '{"job":"\Viewe...', '{"job":"\Viewe...')
#3 /var/www/viewex/vendor/laravel/framework/src/Illuminate/Queue/RedisQueue.php(225): call_user_func_array(Array, Array)
#4 /var/www/viewex/vendor/laravel/framework/src/Illuminate/Queue/RedisQueue.php(182): Illuminate\Queue\RedisQueue->pushExpiredJobsOntoNewQueue(Object(Predis\Transaction\MultiExecContext), 'queues:default', Array)
#5 [internal function]: Illuminate\Queue\RedisQueue->Illuminate\Queue{closure}(Object(Predis\Transaction\MultiExecContext))
#6 /var/www/viewex/vendor/predis/predis/lib/Predis/Transaction/MultiExecContext.php(421): call_user_func(Object(Closure), Object(Predis\Transaction\MultiExecContext))
#7 /var/www/viewex/vendor/predis/predis/lib/Predis/Transaction/MultiExecContext.php(350): Predis\Transaction\MultiExecContext->executeTransactionBlock(Object(Closure))
#8 /var/www/viewex/vendor/predis/predis/lib/Predis/Client.php(402): Predis\Transaction\MultiExecContext->execute(Object(Closure))
#9 /var/www/viewex/vendor/predis/predis/lib/Predis/Client.php(311): Predis\Client->initMultiExec(Array, Object(Closure))
#10 /var/www/viewex/vendor/predis/predis/lib/Predis/Client.php(388): Predis\Client->sharedInitializer(Array, 'initMultiExec')
#11 [internal function]: Predis\Client->transaction(Array, Object(Closure))
#12 /var/www/viewex/vendor/laravel/framework/src/Illuminate/Redis/Database.php(83): call_user_func_array(Array, Array)
#13 /var/www/viewex/vendor/laravel/framework/src/Illuminate/Redis/Database.php(95): Illuminate\Redis\Database->command('transaction', Array)
#14 /var/www/viewex/vendor/laravel/framework/src/Illuminate/Queue/RedisQueue.php(184): Illuminate\Redis\Database->__call('transaction', Array)
#15 /var/www/viewex/vendor/laravel/framework/src/Illuminate/Queue/RedisQueue.php(184): Illuminate\Redis\Database->transaction(Array, Object(Closure))
#16 /var/www/viewex/vendor/laravel/framework/src/Illuminate/Queue/RedisQueue.php(152): Illuminate\Queue\RedisQueue->migrateExpiredJobs('queues:default:...', 'queues:default')
#17 /var/www/viewex/vendor/laravel/framework/src/Illuminate/Queue/RedisQueue.php(118): Illuminate\Queue\RedisQueue->migrateAllExpiredJobs('queues:default')
#18 /var/www/viewex/vendor/laravel/framework/src/Illuminate/Queue/Worker.php(178): Illuminate\Queue\RedisQueue->pop('default')
#19 /var/www/viewex/vendor/laravel/framework/src/Illuminate/Queue/Worker.php(148): Illuminate\Queue\Worker->getNextJob(Object(Illuminate\Queue\RedisQueue), 'default')
#20 /var/www/viewex/vendor/laravel/framework/src/Illuminate/Queue/Console/WorkCommand.php(105): Illuminate\Queue\Worker->pop(NULL, 'default', '0', '3', '0')
#21 /var/www/viewex/vendor/laravel/framework/src/Illuminate/Queue/Console/WorkCommand.php(67): Illuminate\Queue\Console\WorkCommand->runWorker(NULL, 'default', '0', '128', false)
#22 /var/www/viewex/vendor/laravel/framework/src/Illuminate/Console/Command.php(112): Illuminate\Queue\Console\WorkCommand->fire()
#23 /var/www/viewex/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(252): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#24 /var/www/viewex/vendor/laravel/framework/src/Illuminate/Console/Command.php(100): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#25 /var/www/viewex/vendor/symfony/console/Symfony/Component/Console/Application.php(889): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#26 /var/www/viewex/vendor/symfony/console/Symfony/Component/Console/Application.php(193): Symfony\Component\Console\Application->doRunCommand(Object(Illuminate\Queue\Console\WorkCommand), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#27 /var/www/viewex/vendor/symfony/console/Symfony/Component/Console/Application.php(124): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#28 /var/www/viewex/artisan(59): Symfony\Component\Console\Application->run()
#29 {main} [] []

Looks like rpush is being called with null?
Could someone look into this for me please cheers

@GrahamCampbell
Copy link
Member

What laravel version?

@danwdart
Copy link
Author

This is 4.2.x-dev on 42b71be

@danwdart
Copy link
Author

Looks like a problem with this method

protected function pushExpiredJobsOntoNewQueue($transaction, $to, $jobs)
{
call_user_func_array([$transaction, 'rpush'], array_merge([$to], $jobs));
}

Looks like because I'm using Redis 2.2 from the Ubuntu repos, it isn't supported by Laravel since rpush history ( http://redis.io/commands/RPUSH ) says:

History

= 2.4: Accepts multiple value arguments. In Redis versions older than 2.4 it was possible to push a single value per command.

Does Laravel support 2.2 still?

@danwdart
Copy link
Author

Hah, never mind, Redis are only supporting down to 2.6 it seems, so Ubuntu are just holding an old version

Thanks anyway

@GrahamCampbell
Copy link
Member

@dandart Could you send a pull request to the laravel docs saying recommending people to use redis 2.6 or 2.8 in laravel 4.2, and for laravel 5, redis 3 is also supported.

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

2 participants