Error: Call to a member function hMset() on bool

Created on 28 May 2020, over 4 years ago
Updated 18 January 2022, almost 3 years ago

Problem/Motivation

When the Redis server is down, somehow, got WSOD

Error: Call to a member function hMset() on bool in Drupal\redis\Cache\PhpRedis->set() (line 97 of /var/www/html/web/modules/contrib/redis/src/Cache/PhpRedis.php)

Proposed resolution

Fall back to use drupal cache system, when Redis is down.

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

🐛 Bug report
Status

Needs review

Version

1.0

Component

Code

Created by

🇨🇳China jungle Chongqing, China

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇺🇸United States scottsawyer Atlanta

    Just wanted to note that this patch no longer applies to 1.7.0. I am no longer experiencing a condition that causes the error, so removing the patch, and crossing fingers...

  • Status changed to Needs work 8 months ago
  • 🇮🇳India prem suthar Ahemdabad- Gujrat , Jodhpur - Rajsthan

    # 4 patch is Failed To Apply on the latest Code .

    Checking patch src/Cache/PhpRedis.php...
    Checking patch src/Cache/RedisCacheTagsChecksum.php...
    error: while searching for:
    
        // We want to differentiate between PhpRedis and Redis clients.
        if ($this->clientType === 'PhpRedis') {
          $multi = $this->client->multi();
          foreach ($keys as $key) {
            $multi->incr($key);
          }
    
    error: patch failed: src/Cache/RedisCacheTagsChecksum.php:58
    error: src/Cache/RedisCacheTagsChecksum.php: patch does not apply
    Checking patch src/Lock/PhpRedis.php...
    Checking patch src/Queue/ReliablePhpRedis.php...
    
  • 🇮🇳India prem suthar Ahemdabad- Gujrat , Jodhpur - Rajsthan

    Updated The Patch as per latest code.

  • Status changed to Needs review 8 months ago
  • 🇮🇳India prem suthar Ahemdabad- Gujrat , Jodhpur - Rajsthan
  • 🇧🇬Bulgaria alexrayu

    Sadly patch from #8 did not apply for me upgrading to 1.8.0
    Attaching the patch for 1.8.0.

Production build 0.71.5 2024