Django Website throws error after spamming refresh
I have a Django 1.8.4 app that uses python 3.6.9. The problem occurs when i refresh the page like ~10-20 times. I get the following error:
One refresh after the error and the website works again. It seems like the cache returns an error message instead of a file. The caching settings are as follows:
CACHES = {
'default': {
'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache',
'LOCATION': '127.0.0.1:11211',
'OPTIONS': {
'MAX_ENTRIES': 10000,
'TIMEOUT': 604800,
}
}
I checked memcached logs and I got these messages:
Jan 13 16:38:21 ******* systemd[1]: Stopping memcached daemon...
Jan 13 16:38:21 ******* systemd[1]: Stopped memcached daemon.
Jan 13 16:38:21 ******* systemd[1]: Started memcached daemon.
Which doesn't help much. I tried increasing the allocated memory, but the error occured when used up memory was ~160MB / 512MB so it seems like that's not the issue. Setting "Limit the number of simultaneous incoming connections" to 1024 also doesn't help. Does someone have an idead what might be happening?