2

When I want to see the status of memcached I run service --status-all but I get this multiple times "memcached dead but pid file exists" when it lists memcached.

It seems to me that this means memcached needs some cleaning up. How can I remove those messages about the old pid file?

4 Answers 4

0

Depending on your distro, .pid files will either be located in memcached's working directly (like /etc/memcached) or in /var/run.

1

I got this message when memcached has been started under the wrong user account. Killing the old process and restarting it correctly fixed it.

[matt@vm]# service memcached status
memcached dead but pid file exists
[matt@vm]# ps aux | grep memcached
roland   24038  0.0  0.0 349780  ... memcached ... -P /var/run/memcached/memcached.pid
[matt@vm]# sudo kill -9 24038

[matt@vm]# service memcached start
Starting memcached:                     [  OK  ]
[matt@vm]# ps aux | grep memcached
memcached   21159  0.0  0.0 330852 ... memcached ... -P /var/run/memcached/memcached.pid
[matt@vm]# service memcached status
memcached (pid  21159) is running...
1
  • wouldn't it be simpler to do this? service memcached restart
    – Andres SK
    Nov 24, 2015 at 13:07
0

I tried deleting the pid file, but then would get "subsys locked" error. So I actually had to reboot and the memcached would work fine

0

I got this message and I fixed it doing this:

> ps aux | grep memcached

copied the pid and pasted it on the memcached pid location file:

> echo 2600880 > /var/run/memcached/memcached.pid

then it worked

> service memcached status Se está ejecutando memcached (pid 2600880)...

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .