Memcached errors SERVER HAS FAILED AND IS DISABLED UNTIL TIMED RETRY

While recently started using Seafile, in the logging I am receiving the following error messages (using an s3 backend and the UI is very slow, so I am guessing that some caching is not functioning properly). I did not make any significant changes to the docker-compose file offered for version 10. See details below

Error messages

Summary

2023-10-11 15:30:56 …/common/mc-cache.c(82): Failed to set FileLockTS-78f38838-3ba9-4aba-a381-1adbf207b654 to memcached: SERVER HAS FAILED AND IS DISABLED UNTIL TIMED RETRY.
2023-10-11 15:31:26 …/common/mc-cache.c(82): Failed to set vrepo_info_85a495a0-60b9-4715-93a3-3ba5aea030eb to memcached: SERVER HAS FAILED AND IS DISABLED UNTIL TIMED RETRY.
2023-10-11 15:31:26 …/common/mc-cache.c(82): Failed to set vrepo_info_85a495a0-60b9-4715-93a3-3ba5aea030eb to memcached: SERVER HAS FAILED AND IS DISABLED UNTIL TIMED RETRY.
2023-10-11 15:31:26 …/common/mc-cache.c(82): Failed to set vrepo_info_78f38838-3ba9-4aba-a381-1adbf207b654 to memcached: SERVER HAS FAILED AND IS DISABLED UNTIL TIMED RETRY.
2023-10-11 15:31:26 …/common/mc-cache.c(82): Failed to set vrepo_info_78f38838-3ba9-4aba-a381-1adbf207b654 to memcached: SERVER HAS FAILED AND IS DISABLED UNTIL TIMED RETRY.
2023-10-11 15:31:26 …/common/mc-cache.c(82): Failed to set FolderPermTS-85a495a0-60b9-4715-93a3-3ba5aea030eb to memcached: SERVER HAS FAILED AND IS DISABLED UNTIL TIMED RETRY.
2023-10-11 15:31:26 …/common/mc-cache.c(82): Failed to set FolderPermTS-78f38838-3ba9-4aba-a381-1adbf207b654 to memcached: SERVER HAS FAILED AND IS DISABLED UNTIL TIMED RETRY.
2023-10-11 15:31:26 …/common/mc-cache.c(82): Failed to set FileLockTS-85a495a0-60b9-4715-93a3-3ba5aea030eb to memcached: SERVER HAS FAILED AND IS DISABLED UNTIL TIMED RETRY.
2023-10-11 15:31:26 …/common/mc-cache.c(82): Failed to set FileLockTS-78f38838-3ba9-4aba-a381-1adbf207b654 to memcached: SERVER HAS FAILED AND IS DISABLED UNTIL TIMED RETRY.

Docker Compose

Summary
version: '2.0'
services:
  db:
    image: mariadb:10.11
    container_name: seafile-mysql
    environment:
      - MYSQL_ROOT_PASSWORD=db_dev  # Requested, set the root's password of MySQL service.
      - MYSQL_LOG_CONSOLE=true
    volumes:
      - /opt/seafile-mysql/db:/var/lib/mysql  # Requested, specifies the path to MySQL data persistent store.
    networks:
      - seafile-net

  memcached:
    image: memcached:1.6.18
    container_name: seafile-memcached
    entrypoint: memcached -m 256
    networks:
      - seafile-net

  elasticsearch:
    image: elasticsearch:8.6.2
    container_name: seafile-elasticsearch
    environment:
      - discovery.type=single-node
      - bootstrap.memory_lock=true
      - "ES_JAVA_OPTS=-Xms1g -Xmx1g"
    ulimits:
      memlock:
        soft: -1
        hard: -1
    mem_limit: 2g
    volumes:
      - /opt/seafile-elasticsearch/data:/usr/share/elasticsearch/data0  # Requested, specifies the path to Elasticsearch data persistent store.
    networks:
      - seafile-net
          
  seafile:
    image: docker.seadrive.org/seafileltd/seafile-pro-mc:latest
    container_name: seafile
    ports:
      - "80:80"
      - "443:443"
    volumes:
      - /opt/seafile-data:/shared   # Requested, specifies the path to Seafile data persistent store.
    environment:
      - DB_HOST=db
      - DB_ROOT_PASSWD=db_dev  # Requested, the value should be root's password of MySQL service.
#     - TIME_ZONE=Asia/Shanghai # Optional, default is UTC. Should be uncomment and set to your local time zone.
      - SEAFILE_ADMIN_EMAIL=<REDACTED>
      - SEAFILE_ADMIN_PASSWORD=<REDACTED>
      - SEAFILE_SERVER_LETSENCRYPT=true
      - SEAFILE_SERVER_HOSTNAME=<REDACTED>
    depends_on:
      - db
      - memcached
      - elasticsearch
    networks:
      - seafile-net

  oods:
    image: onlyoffice/documentserver:latest
    container_name: seafile-oods
    volumes:
      - /opt/seafile-oods/DocumentServer/logs:/var/log/onlyoffice
      - /opt/seafile-oods/DocumentServer/data:/var/www/onlyoffice/Data
      - /opt/seafile-oods/DocumentServer/lib:/var/lib/onlyoffice
      - /opt/seafile-oods/DocumentServer/local-production-linux.json:/etc/onlyoffice/documentserver/local-production-linux.json
    networks:
      - seafile-net
    environment:
      - JWT_ENABLED=true
      - JWT_SECRET=<REDACTED>

networks:
  seafile-net:

seahub_settings.py:

Summary
CACHES = {
    'default': {
        'BACKEND': 'django_pylibmc.memcached.PyLibMCCache',
        'LOCATION': 'memcached:11211',
    },
    'locmem': {
        'BACKEND': 'django.core.cache.backends.locmem.LocMemCache',
    },
}
COMPRESS_CACHE_BACKEND = 'locmem'

Checked:

  • Memcached is running under name ‘seafile-memcached’
  • Also elasticsearch is probably not working, since I cannot search for files. But I should probably make a different topic for this

Fixed it, I copied some lines for installing onlyoffice from somewhere and I had to make the following correction:

In conf/seafile.conf

[memcached]
memcached_options = --SERVER=localhost --POOL-MIN=10 --POOL-MAX=100

To the correct value

[memcached]
memcached_options = --SERVER=memcached --POOL-MIN=10 --POOL-MAX=100