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?

Cristian Ciupitu
  • 6,396
  • 2
  • 42
  • 56
Paul Sheldrake
  • 537
  • 1
  • 6
  • 14

4 Answers4

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...
Foz
  • 111
  • 3
0

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

Nathan C
  • 15,059
  • 4
  • 43
  • 62
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

Vidz
  • 111
  • 2
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)...

Tomás
  • 113
  • 5