Giter Site home page Giter Site logo

Comments (6)

andrewjshults avatar andrewjshults commented on June 24, 2024

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).

from php-resque.

kballenegger avatar kballenegger commented on June 24, 2024

Should have mentioned this before, but this is for the LPOP.

I just checked this on redis-cli.

redis 127.0.0.1:6379> lpop resque:queue:api
"{\"class\":\"ApiQueueWorker\",\"args\":[{\"type\":\"install\",\"data\":{\"sdk\":\"2.5.7\",\"os\":\"5.0.1\",\"uuid\":\"7ebec17bb2584489d0390a0e0b6c92575dc778ec\",\"app\":\"4ebb12775d2b94047d000000\",\"ui\":\"1\",\"signature\":\"a4618a79d1dabc8987c5da6e81bebd72\",\"country\":\"US\",\"bundle\":\"1.3.0\",\"language\":\"en\",\"model\":\"iPad\",\"date_created\":1324644314,\"queue_type\":\"installs\"}}],\"id\":\"4500e90b417df4f652be1ee7f1892f38\"}"

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.

from php-resque.

chrisboulton avatar chrisboulton commented on June 24, 2024

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.

from php-resque.

alexdemers avatar alexdemers commented on June 24, 2024

I just had the same issue. My process was running for the past 4 days.

from php-resque.

chrisboulton avatar chrisboulton commented on June 24, 2024

@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)?

from php-resque.

alexdemers avatar alexdemers commented on June 24, 2024

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.

from php-resque.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.