Hi. I set the seahub configuration file ‘seahub_settings.py’ to use memcached. During startup you have the following problems:.
I installed the following packages:
pip install pylibmc django django-pylibmc python-memcached
apt-get install memcached libmemacached-dev
And here is also the seahub_settings configuration file:
ServerDown: error 47 from memcached_add: (0x555e5943ed70) SERVER HAS FAILED AND IS DISABLED UNTIL TIMED RETRY, socket: /var/run/memcached.sock -> libmemcached/connect.cc:720
2019-04-18 20:58:29,606 [ERROR] django.pylibmc:132 get MemcachedError: error 26 from memcached_get(:1:CUR_TOPINFO): Broken pipe
Traceback (most recent call last):
File "/home/cloudhome/.local/lib/python2.7/site-packages/django_pylibmc/memcached.py", line 130, in get
return super(PyLibMCCache, self).get(key, default, version)
File "/home/cloudhome/cloud/seafile/seafile-server-6.2.5/seahub/thirdpart/Django-1.8.18-py2.7.egg/django/core/cache/backends/memcached.py", line 84, in get
val = self._cache.get(key)
Error: error 26 from memcached_get(:1:CUR_TOPINFO): Broken pipe
2019-04-18 20:58:29,688 [ERROR] django.pylibmc:132 get MemcachedError: error 26 from memcached_get(:1:throttle_user_3): Broken pipe
Traceback (most recent call last):
File "/home/cloudhome/.local/lib/python2.7/site-packages/django_pylibmc/memcached.py", line 130, in get
return super(PyLibMCCache, self).get(key, default, version)
File "/home/cloudhome/cloud/seafile/seafile-server-6.2.5/seahub/thirdpart/Django-1.8.18-py2.7.egg/django/core/cache/backends/memcached.py", line 84, in get
val = self._cache.get(key)
Error: error 26 from memcached_get(:1:throttle_user_3): Broken pipe
2019-04-18 21:04:48,666 [ERROR] django.pylibmc:132 get MemcachedError: error 26 from memcached_get(:1:throttle_user_3): Broken pipe
Traceback (most recent call last):
File "/home/cloudhome/.local/lib/python2.7/site-packages/django_pylibmc/memcached.py", line 130, in get
return super(PyLibMCCache, self).get(key, default, version)
File "/home/cloudhome/cloud/seafile/seafile-server-6.2.5/seahub/thirdpart/Django-1.8.18-py2.7.egg/django/core/cache/backends/memcached.py", line 84, in get
val = self._cache.get(key)
Error: error 26 from memcached_get(:1:throttle_user_3): Broken pipe
2019-04-24 12:49:06,210 [ERROR] django.pylibmc:132 get MemcachedError: error 26 from memcached_get(:1:CUR_TOPINFO): Broken pipe
Traceback (most recent call last):
File "/home/cloudhome/.local/lib/python2.7/site-packages/django_pylibmc/memcached.py", line 130, in get
return super(PyLibMCCache, self).get(key, default, version)
File "/home/cloudhome/cloud/seafile/seafile-server-6.2.5/seahub/thirdpart/Django-1.8.18-py2.7.egg/django/core/cache/backends/memcached.py", line 84, in get
val = self._cache.get(key)
Error: error 26 from memcached_get(:1:CUR_TOPINFO): Broken pipe
2019-04-24 12:49:06,211 [ERROR] django.pylibmc:132 get MemcachedError: error 26 from memcached_get(:1:CUR_TOPINFO): Broken pipe
Traceback (most recent call last):
File "/home/cloudhome/.local/lib/python2.7/site-packages/django_pylibmc/memcached.py", line 130, in get
return super(PyLibMCCache, self).get(key, default, version)
File "/home/cloudhome/cloud/seafile/seafile-server-6.2.5/seahub/thirdpart/Django-1.8.18-py2.7.egg/django/core/cache/backends/memcached.py", line 84, in get
val = self._cache.get(key)
Error: error 26 from memcached_get(:1:CUR_TOPINFO): Broken pipe
2019-04-24 12:49:06,242 [ERROR] django.pylibmc:132 get MemcachedError: error 26 from memcached_get(:1:CUR_TOPINFO): Broken pipe
Traceback (most recent call last):
File "/home/cloudhome/.local/lib/python2.7/site-packages/django_pylibmc/memcached.py", line 130, in get
return super(PyLibMCCache, self).get(key, default, version)
File "/home/cloudhome/cloud/seafile/seafile-server-6.2.5/seahub/thirdpart/Django-1.8.18-py2.7.egg/django/core/cache/backends/memcached.py", line 84, in get
val = self._cache.get(key)
Error: error 26 from memcached_get(:1:CUR_TOPINFO): Broken pipe
2019-04-24 12:49:06,254 [ERROR] django.pylibmc:132 get MemcachedError: error 26 from memcached_get(:1:CUR_TOPINFO): Broken pipe
Traceback (most recent call last):
File "/home/cloudhome/.local/lib/python2.7/site-packages/django_pylibmc/memcached.py", line 130, in get
return super(PyLibMCCache, self).get(key, default, version)
File "/home/cloudhome/cloud/seafile/seafile-server-6.2.5/seahub/thirdpart/Django-1.8.18-py2.7.egg/django/core/cache/backends/memcached.py", line 84, in get
val = self._cache.get(key)
Error: error 26 from memcached_get(:1:CUR_TOPINFO): Broken pipe
This way it works, but I see that unfortunately memcached is not working properly. In the sense that it does not save in the ram-cache the data coming from seahub as it should … Why?
then … I tried all the ways but the error persists. I tried also with the configuration proposed by Cisco but nothing … the error persists and not only … I noticed that in this way memcached does not “come into operation”. Place a memcached screenshots with the configuration suggested by cisco:
if instead I remove the cisco configuration I put the first one (the one that is also on the seafile site), that is:
everything works … but log errors persist. Around I read that many have opted for the Cisco configuration … and in fact it is true … errors in the logs no longer appear … but this because memcached, in this way and with those configurations, is not “called” by seahub … so memcached does not enter “in game”!
I also see that the django version of seahub is a bit old! So this makes me deduce that seahub is almost never updated … partly it’s true! Furthermore, as we can see from the logs, the error also comes mainly from here:
File "/home/cloudhome/cloud/seafile/seafile-server-6.2.5/seahub/thirdpart/Django-1.8.18-py2.7.egg/django/core/cache/backends/memcached.py", line 84, in get
val = self._cache.get(key)
so … isn’t that the problem comes from the obsolete version of django?
Because if it is so, obviously the version of django present in the server does not recognize some “new” features that have the packages installed and also recommended by the seafile site. So I hope you seriously consider what has just been said!
Also right now I uninstalled the “python-memcache” package and tried to restart seafile. Everything continues to work, but there are always errors in the logs. This suggests that however it does not depend on “python-memcache” but on some package contained in the seafile server (django for example).
I see your point and cannot disagree with what you’re saying. It’s a mess!
This problem with memcached has been around for a long time. I really don’t think there is a well-defined approach laid out yet. We need some considered input from Development in order to settle it (and certainly more so as we move to a new release of server). Maybe @daniel.pan or @Jonathan can offer a few words of advice here?
Let’s hope. Also because I noticed that this problem has been present for a long time … but it has not yet been solved … and I have read that in any case there were people who would have said to fix this situation … but none yet the did!
I suggest you upgrade the seafile to 6.3.4 and configure seahub_settings.py according to the manual (https://manual.seafile.com/deploy/add_memcached.html), which means you should use IP:PORT not a sock file. Of course, this will require your memcached service to listen on a valid port.