Owncloud and public shares not returning data

Owncloud and public shares not returning data

I just ran into an issue with Owncloud after updating where public password-protected shares would fail to open and just give a blank result to the browser.

It turns out this is a problem with the way that Owncloud is using Memcache. Now, I could go into the whole lecture of how Owncloud is using Memcache completely wrong (they are) in more than one way. Instead I'm going to just give you a quick fix.

So, if you notice these in your logs:

apache2: libmemcached/storage.cc:341: memcached_return_t memcached_send_ascii(memcached_st*, memcached_server_write_instance_st, const char*, size_t, const char*, size_t, time_t, uint32_t, uint64_t, bool, bool, memcached_storage_action_t): Assertion `memcached_failed(rc)' failed.
apache2: libmemcached/storage.cc:341: memcached_return_t memcached_send_ascii(memcached_st*, memcached_server_write_instance_st, const char*, size_t, const char*, size_t, time_t, uint32_t, uint64_t, bool, bool, memcached_storage_action_t): Assertion `memcached_failed(rc)' failed.
[Fri Oct 03 15:16:00.329950 2014] [core:notice] [pid 5009] AH00052: child pid 5157 exit signal Aborted (6)
[Fri Oct 03 15:16:00.330375 2014] [core:notice] [pid 5009] AH00052: child pid 5161 exit signal Aborted (6)
[Fri Oct 03 15:16:00.330517 2014] [core:notice] [pid 5009] AH00052: child pid 5201 exit signal Aborted (6)
[Fri Oct 03 15:16:00.330652 2014] [core:notice] [pid 5009] AH00052: child pid 5203 exit signal Aborted (6)

Try adding the following line to the bottom of /etc/memcached.conf:

-B binary
That will force everything on the server to use a binary data protocol with Memcached. This fixes issues with spaces in key names or values that memcache doesn't really support otherwise. Now the real question - if Memcache fails, why doesn't Owncloud just ignore the result and move on without Memcache?
Posted by Tony on Oct 03, 2014 | OwnCloud