Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to run memcached on a centos box and it runs for a while, but then ends up in this state:

memcached dead but subsys locked

netstat shows this:

tcp        0      0 :::11211                    :::*                        LISTEN      
udp        0      0     *

ps shows this:

nobody   21983  0.0  1.8  60272 19912 ?        Ssl  16:46   0:00 memcached -d -p 11211 -u nobody -c 1024 -m 64

Anyone know what that means?

share|improve this question
up vote 43 down vote accepted

This means the service was running at one time, but has crashed.

When you start a service, it creates a "lock" file to indicate that the service is running. This helps avoid multiple instances of the service. When you stop a service, this lock file is removed.

When a running service crashes, the lock file exists but the process no longer exists. Thus, the message.

Look at the two areas /var/run/*.pid and /var/lock/subsys/*. These are expected to agree with each other. That is, if the (emtpy file) lockfile /var/lock/subsys/crond exists, then the first line of the file /var/run/ is expected to contain the PID of the process running for this service. If no such process is running, then something is wrong. If a process is indeed running (as you see) but it is not that PID, then something is probably confused.

share|improve this answer
Isn't it still running if it's bound to a port and listed in ps? – Nick Brosnahan Jun 16 '09 at 0:49
I extended my answer. Do "ls /var/lock/subsys/memcached" (I assume this file exists) and then "cat /var/run/" and look at the first line. The first line is the PID you should expect to see for memcached. – Eddie Jun 16 '09 at 0:55
Sorry, I figured out what was going on. It was still running. I launched it using "sudo /sbin/service memcached start", but looking back in my history, I got the status using "/sbin/service memcached service". PEBCAK. All is well. Thanks for your help. – Nick Brosnahan Jun 16 '09 at 1:00
Ah, and running the status not as root, you may not have had read access to /var/run/, thus, the command assumed the subsystem was dead because it couldn't locate the correct process. – Eddie Jun 16 '09 at 1:02

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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