michelsalib / BCCResqueBundle

The BCC resque bundle provides integration of php-resque to Symfony2. It is inspired from resque, a Redis-backed Ruby library for creating background jobs, placing them on multiple queues, and processing them later.
122 stars 91 forks source link

Scheduled worker - strlen expects parameter 1 to be string #133

Closed lsv closed 8 years ago

lsv commented 9 years ago

So I just started the scheduler and it added the pid file and it looked like it was running. Though my scheduled queue didnt change.

So I ran it in foreground, and getting some errors

console bcc:resque:scheduledworker-start -f
Starting worker /usr/bin/php /var/www/sites/dcs.dk/vendor/bcc/resque-bundle/BCC/ResqueBundle/Command/../bin/resque-scheduler
*** Prefix set to dcs
*** Starting scheduler worker
PHP Warning:  strlen() expects parameter 1 to be string, array given in /var/www/sites/dcs.dk/vendor/colinmollenhour/credis/Client.php on line 1110

Warning: strlen() expects parameter 1 to be string, array given in /var/www/sites/dcs.dk/vendor/colinmollenhour/credis/Client.php on line 1110
PHP Notice:  Array to string conversion in /var/www/sites/dcs.dk/vendor/colinmollenhour/credis/Client.php on line 1110

Notice: Array to string conversion in /var/www/sites/dcs.dk/vendor/colinmollenhour/credis/Client.php on line 1110

One of my jobs have this in details

Array
(
    [class] => Dcs\ImporterBundle\Jobs\ImportCnetDataJob
    [args] => Array
        (
            [0] => Array
                (
                    [data] => 60860
                    [kernel.root_dir] => /var/www/sites/dcs/app
                    [kernel.debug] => 
                    [kernel.environment] => prod
                    [bcc_resque.retry_strategy] => Array
                        (
                            [0] => 0
                            [1] => 10
                            [2] => 60
                        )

                    [bcc_resque.retry_attempt] => 2
                )

        )

    [queue] => import_cnet_data
)

I can see its an issue in credis, is there anybody that knows a quickfix?

danhunsaker commented 9 years ago

This sounds like the transient error that crops up with a difference in how phpredis and Credis's PHP-only mode handle ZRANGEBYSCORE... If you're using the phpredis extension, try turning it off and see if that fixes it. If not, try installing it and turning it on.

lsv commented 8 years ago

Installing php-redis helped it.