Local without memcache breaks after update

Created on 12 July 2024, about 2 months ago
Updated 3 September 2024, 4 days ago

Problem/Motivation

I have a site on local for debug, when I upgrade from 8.x-2.5 to 8.x-2.6. The site breaks and keep on showing the error
Uncaught PHP Exception Drupal\memcache\MemcacheException: "No Memcache extension found"

And the following override no longer works on settings.php.

$settings['memcache']['servers'] = [];
$settings['memcache']['bins'] = [];

After I downgraded it back to 8.x-2.5, the local site works.

πŸ’¬ Support request
Status

Needs work

Version

2.6

Component

Code

Created by

πŸ‡²πŸ‡ΎMalaysia ktch_my

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

Merge Requests

Comments & Activities

  • Issue created by @ktch_my
  • First commit to issue fork.
  • πŸ‡³πŸ‡±Netherlands Spokje

    The same happened for me.

    memcache_admin_post_update_add_service_definitions invalidated the container, as intended, and afterwards local/development/whatever environments with this module enabled whilst having neither Memcache nor Memcached installed fail with a 500 Uncaught PHP Exception Drupal\memcache\MemcacheException: "No Memcache extension found".

  • Merge request !32Respect empty array servers && bins settings β†’ (Merged) created by Spokje
  • Pipeline finished with Success
    about 2 months ago
    Total: 190s
    #224538
  • Status changed to Needs review about 2 months ago
  • πŸ‡³πŸ‡±Netherlands Spokje

    The MR solved our use case (having drupal/memcache enabled, but neither Memcache nor Memcached installed), but is at best "iffy".

    Not even sure how this situation came to be, since it seems to be not possible to enabled this module without having either Memcache or Memcached installed (See also #3136253: Disable memcache on local or dev environments (Drupal 8) β†’ ), but here we are.

    A "proper" solution would include decent tests, probably(?) a dedicated setting and the possibility to install without having either Memcache or Memcached installed.

    But foremost, we need a blessing from the maintainer(s) if they want to support such a solution.

    Putting this on NR in the hope this will attract that attention.

  • πŸ‡ΊπŸ‡ΈUnited States NicholasS

    I had the same error one of our environments didn't have a good memecache compiled for its PHP.

    BUT the patch did not fix it, so I think it needs work still, same error

  • First commit to issue fork.
  • Pipeline finished with Skipped
    about 1 month ago
    #235432
  • Status changed to Fixed about 1 month ago
  • πŸ‡ΊπŸ‡ΈUnited States japerry KVUO

    Good catch. Committed!

  • πŸ‡ΊπŸ‡ΈUnited States jrglasgow Idaho

    Any chance getting a new release with this fix?

  • πŸ‡ΊπŸ‡ΈUnited States jrglasgow Idaho

    I was having the same issue and ended up tracking it down to this issue... I have a different symptom. After running composer update my `drush cr` failed with this message:

    $ drush cr

    In Container.php line 147:

    Circular reference detected for service "module_handler", path: "module_handler -> cache.bootstrap -> logger.factory -> logger.syslog -> config.factory -> config.typed".

    Failed to run drush cr: exit status 1

    the `drush updb` succeeded but had some
    [error] MemcachedDriver::set() error
    errors.

    I then put in a breakpoint where the exception was being thrown and traced it back to Memcache and reverted from 8.x-2.6 to 8.x-2.5 and the problem was resolved. Also updated to the latest dev release resolves the issue.

    I am putting the specific errors I had in here to make it easier to find when searching.

  • πŸ‡ΊπŸ‡ΈUnited States dhansen

    Pushing for a full release of this fix. Our sites avoid dev versions as potentially unstable, and this is playing havoc with our testing pipeline and requiring significant workarounds for non-production environments.

  • πŸ‡¦πŸ‡ΊAustralia marknatividad

    I am also having a similar circular reference issue after upgrading to Drupal 10.3.1 and downgrading memcache to 2.5.0.

    After running drush cr I get the following error:

    In Container.php line 222:

    Circular reference detected for service "cache.bootstrap", path: "module_handler -> cache.bootstrap -> cache.backend.memcache -> Drupal\Component\Datetime\TimeInterface -> state -> cache.bootstrap".

  • πŸ‡¨πŸ‡¦Canada paulsheldrake

    This is still an issue on the 2.7 release

  • Status changed to Needs work 18 days ago
  • πŸ‡ΊπŸ‡ΈUnited States japerry KVUO

    Well shoot. Lets see if there are other reports and then re-escalate as a bug. I'll try to reproduce the issue, but it won't be until next week or early September though.

  • πŸ‡³πŸ‡±Netherlands Spokje

    @paulsheldrake What are the symptoms of the issue on 2.7?

    Any errors showing in the log, on screen, etc?

  • πŸ‡ΊπŸ‡ΈUnited States dhansen

    Circling back: the fix on 2.7 seems to work for me. Note that I did need to run drush updatedb which ran add_service_definitions from memcache_admin to clear an error that appeared.

Production build 0.71.5 2024