In case someone else stumbles upon this question, there is a bug on the debian distribution of memcached (which means flavours like Ubuntu would also be affected).
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=784357
Because of this bug, even when you have separate configuration files, when you run sudo service memcached restart
, only the default configuration file in /etc/memcached.conf
will be loaded.
As mentioned in the comment here, the temporary solution is to
Remove
/lib/systemd/system/memcached.service
Run
sudo systemctl daemon-reload
(don't worry, it is safe to do so)Finally, run
sudo service memcached restart
if you are okay with losing all cache information. If not, runsudo service memcached force-reload