OnlyOffice callback error

this happens on the onlyoffice side. its random too. i dont have this problem, as i have the same setup as xface

Solved the problem by disabling memcached

This is no solution for me. Without some caching Seafile responds with a noticeable delay. Especially if there are a few users constantly.

I agree that the decision is temporary, and is not suitable for everyone. But why until now it is not solved by the developers, since the problem was immediately after the announcement of integration with OO

1 Like

Did you manage to fix it another way?

I didnt try disabled memcached yet (but will in a min)

Seahub.log says:

2019-06-23 11:12:48,717 [ERROR] django.request:135 handle_uncaught_exception Internal Server Error: /onlyoffice/editor-callback/
Traceback (most recent call last):
  File "/home/seafile/seafile-server-6.3.4/seahub/thirdpart/django/core/handlers/exception.py", line 41, in inner
    response = get_response(request)
  File "/home/seafile/seafile-server-6.3.4/seahub/thirdpart/django/core/handlers/base.py", line 249, in _legacy_get_response
    response = self._get_response(request)
  File "/home/seafile/seafile-server-6.3.4/seahub/thirdpart/django/core/handlers/base.py", line 187, in _get_response
    response = self.process_exception_by_middleware(e, request)
  File "/home/seafile/seafile-server-6.3.4/seahub/thirdpart/django/core/handlers/base.py", line 185, in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/home/seafile/seafile-server-6.3.4/seahub/thirdpart/django/views/decorators/csrf.py", line 58, in wrapped_view
    return view_func(*args, **kwargs)
  File "/home/seafile/seafile-server-6.3.4/seahub/seahub/onlyoffice/views.py", line 87, in onlyoffice_editor_callback
    doc_info = json.loads(cache.get("ONLYOFFICE_%s" % doc_key))
  File "/usr/lib/python2.7/json/__init__.py", line 339, in loads
    return _default_decoder.decode(s)
  File "/usr/lib/python2.7/json/decoder.py", line 364, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
TypeError: expected string or buffer`

Edit: can confirm that disabling memcache works but its a bad solution :frowning:

Edit2: got memcached working.
Before i used memcached via socket, now its via tcp port.

● memcached.service - memcached daemon
   Loaded: loaded (/lib/systemd/system/memcached.service; enabled; vendor preset: enabled)
   Active: active (running) since Sun 2019-06-23 13:21:53 CEST; 1s ago
     Docs: man:memcached(1)
 Main PID: 16341 (memcached)
    Tasks: 7 (limit: 4915)
   Memory: 868.0K
      CPU: 6ms
   CGroup: /system.slice/memcached.service
           └─16341 /usr/bin/memcached -m 128 -p 11211 -u memcache -l 127.0.0.1 -U 11211

Seahub_settings.py:

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

Memcahe & saving works now.