I want to install memcached with php7, so I downloaded the actual php7.0-memcached package from the dotdeb repository.

But it doesn't work: I get following error in the nginx error files when I want to use memcached with my CMS: recv() failed (104: Connection reset by peer) while reading response header from upstream==> 502


First please check that memcached gives the permission to your domain to access to it. By default is only allowing interface. So you have 2 options, add your interface or makes your domain pointing to localhost in your /etc/hosts file.

To know if this is the cause of the problem, you can run this :

echo "stats settings" | nc localhost 11211

if you see

yourdomain.com [] 11211 (?) : Connection refused

so that's probably the cause.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.