You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This error happens occasionally at random in my application.
The application:
uses gunicorn --workers 1 --threads 8, so with gthread
connects to memcached through a UNIX socket
the application and memcached run in separate Docker Compose services, with the UNIX socket being shared through a named volume
Cache configuration in Django:
CACHES= {
'default': {
'BACKEND': 'django.core.cache.backends.memcached.PyMemcacheCache',
'LOCATION': 'unix:/var/run/memcached/memcached.sock',
'OPTIONS': {
'use_pooling': True, # Keeps connections alive, more reliable with multiple threads per worker.'default_noreply': True, # Do not wait for a reply when we do not need it.'connect_timeout': 10.0, # seconds'timeout': 10.0, # seconds
},
},
}
'ignore_exc': True could be specified to consider this error a cache miss (if this type of error is correctly caught), but this means we would not know whether 1% or 100% of the cache calls are failing.
This error happens occasionally at random in my application.
The application:
gunicorn --workers 1 --threads 8
, so with gthreadCache configuration in Django:
'ignore_exc': True
could be specified to consider this error a cache miss (if this type of error is correctly caught), but this means we would not know whether 1% or 100% of the cache calls are failing.Versions:
pymemcache 4.0.0
memcached 1.6.31 (from the memcached:1.6.31-alpine Docker image)
gunicorn 23.0.0
Python 3.12.4
Django 5.0.7
Relevant traceback:
EDIT: The memcached server was up and running at that time.
docker compose ps
considered it healthy for the entire day this issue happened.The text was updated successfully, but these errors were encountered: