Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Trying out the 7.x-3.x from 7.x-2.12" branch and started seeing this error right away on drush cc all.
EVAL failed: ERR unknown command 'EVAL' PhpRedis.php:130
Redis server version 2.4.10 (00000000:0)
Comments
Comment #1
joelpittetComment #2
pounardI thought I documented it, but the 3.x release won't work with Redis <2.6 du to the missing EVAL command.
Please see http://redis.io/commands/eval
Also not that 2.6 series will bump the required Redis version to 2.6 when the EVAL usage will be backported.
Thanks for reporting, I need to update the documentation.
Comment #3
joelpittetI put it back to 2.x version immediately.
Yeah this is doc fix, as it mentioned only >=2.4
There was another minor problem that prompted the upgrade but I can't recall, I'll open a new issue if it resurfaces.
Comment #4
pounardjoelpittet, you can try using
$conf['redis_flush_mode'] = 3;
and I think it should work with Redis 2.4 (this mode enforce a sharding compatible behavior, and use a tiny subset of Redis).Comment #5
joelpittetA bit worried about trying sharding as I'm not sure what that is. I'll read up on it before I do that. Also my client is testing some stuff out this week so don't want to mess with stuff atm.
Thanks for the suggestion.
Comment #6
pounardThe sharding mode just deactivate a few get multiple and proceed to individual get calls, and does not uses the EVAL command to clear cache, but just mark somewhere in Redis the last flush timestamp, and proceed to real entry deletion when reading it and detects it as invalid. Its mainly the same code, without the EVAL and few additional redis calls (basically, in order to be able to use multiple Redis instances, you can't proceed to advanced commands that work on multiple keys at once).
It's safe and also unit tested, so you don't have to worry.
Comment #7
joelpittetOk I put that into play. Just had to wait till they were done testing stuff out:)
*crossing fingers* but so far things seem to be working with 2.4
Comment #8
JvE CreditAttribution: JvE at One Shoe commentedThere is a pretty major side effect though:
Whenever any code tries to flush a cache with a wildcard, that entire cache bin is flushed, not just the entries that match the wildcard.
So a
cache_clear_all('node_types:', 'cache', TRUE);
will not only invalidate the node_types cache but also the theme_registry and everything else in the 'cache' bin.Comment #9
pounard@JvE that's true, that's something I still didn't found out the right solution for, when working in the sharded mode, but that's not true when using EVAL scripts.
Comment #10
DevElCuy CreditAttribution: DevElCuy at Dilygent commentedSetting at #4 worked like a charm, thanks @pounard!
Comment #11
karthid CreditAttribution: karthid commented#4 is working for me. Great Stuff. Thanks
Comment #12
pounardFor all people following this issue, does it really still need to be documented or the current documentation seems to be enough for you (real question being, should I close this issue or not) ?
Comment #13
eelkeblokComment #16
pounard