-
Notifications
You must be signed in to change notification settings - Fork 762
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
json_decode error in workers #33
Comments
Which version of Redis and php-resque are you running? Redisent is a pretty lightweight wrapper around the Redis protocol. From looking at Redisent::__call, the only situation that it should return an array is if it got a multi bulk reply (http://redis.io/topics/protocol#multi-bulk-reply). Could you take a look at what Redis command Redisent is trying to run (on mine, it's line 73 in lib/Redisent/Redisent.php). The worker should be running LPOP to pull items off the queue which should (as far as I can tell) return a bulk reply but not a multi-bulk reply (since it should only be returning one element at a time). |
Should have mentioned this before, but this is for the LPOP. I just checked this on redis-cli.
Looks like redis is returning a bulk-reply alright, when I try doing an lpop manually off redis. Not too sure what the deal is here. |
This should be fixed by changes introduced in 1.2, specifically with the detection of when php-resque forks and needs to reconnect to Redis. If this is still happening on 1.2, let me know. |
I just had the same issue. My process was running for the past 4 days. |
@alexdemers, hmm - you're definitely running the latest version? How do you start your workers? With the built in worker manager (COUNT > 1), or using monit/God/etc (with COUNT=1)? |
I run the latest version of php-resque as of today. Redis is 2.4.17 which was the stable release about 3 weeks ago. I have an executable script which simply has: <?php
date_default_timezone_set('UTC');
putenv('REDIS_BACKEND=xxx.xxx.xxx.xxx');
putenv('REDIS_DATABASE=0');
putenv('QUEUE=*');
require 'resque.php'; So, I don't do anything with the COUNT except the default behavious when none is supplied. |
Getting the following warning in the workers:
Which seems to trace back to
Resident::__call
. Not sure what's going on there, and I don't know the internals of Redis enough to know why it's trying to json_decode a string rather than an array. Fwiw, jovs are added by doingResque::enqueue($queue, $class, $args);
where$args
is always an array.Thoughts?
The text was updated successfully, but these errors were encountered: