Memcache and S3

I followed the configuration of memcache during my install here

in my seahub_settings.py I have:

CACHES = {
    'default': {
        'BACKEND': 'django_pylibmc.memcached.PyLibMCCache',
        'LOCATION': '127.0.0.1:11211',
    },
}

I also saw a post on this forum that it should be included in each section if seafile.conf if you are using S3 objects. So I placed the below in each of the three sections:

memcached_options = --SERVR=localhost --POOL-MIN=10 --POOL-MAX=100

When I restart the server, it shows the following:

2024-03-23 16:23:47 ../common/obj-backend-s3.c(743): Failed to create object cache, memcache or redis group should be configured.
2024-03-23 16:23:47 ../common/block-backend-s3.c(1082): Failed to create object cache, memcache or redis group should be configured.
2024-03-23 16:23:47 ../common/obj-backend-s3.c(743): Failed to create object cache, memcache or redis group should be configured.

I know nothing about memcache, so I have no idea where to look for ideas.

Should I have these entries in the conf file?

thanks

Hi

I strictly went by Amazon S3 Backend - Seafile Admin Manual which references seafile.conf - Seafile Admin Manual for memcached usage together with S3.

So for my setup (pro edition v10.0.14 with MinIO as S3 backend), I just did this:

# Add the following to seahub_settings.py.
#
cat <<EOF >>/opt/seafpro/conf/seahub_settings.py
CACHES = {
    'default': {
        'BACKEND': 'django_pylibmc.memcached.PyLibMCCache',
        'LOCATION': '127.0.0.1:11211',
    },
}

EOF

# Add the following to seafile.conf.
#
cat <<EOF >>/opt/seafpro/conf/seafile.conf
[memcached]
memcached_options = --SERVER=127.0.0.1:11211 --POOL-MIN=10 --POOL-MAX=100

EOF

I am assuming the manual is up-to-date, and at least Iā€™m not seeing any errors related to memcached, so I think this is the way to do it.

1 Like

Hi @Attefall, this worked perfectly. I removed the memchached_options from each of the three object sections and added your section:

Superstar :star2:

1 Like