Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

My application seems to be having issues with memcached not stopping.

I'm using php, and have specific keys expiring after every hour. However those keys & values are not repopulating anymore.

When I run:

/etc/init.d/memcached restart

I get the following:

Stopping memcached:                                        [FAILED]
Starting memcached:                                        [  OK  ]

I have to run a killall memcached for memcached to stop. I then run a restart and everything is fine.

I'm not exactly sure what is causing this, but I need memcached to be restarting every hour. Where should I be looking to find out what is causing this?

share|improve this question
1  
You need memcached to restart once an hour? Sounds like you've got some other problem you're trying to inelegantly solve, too. You can set an expiration time for memcached keys when you set them... –  ceejayoz Apr 4 '13 at 15:03
    
Perhaps I was unclear, but the expirations are set once an hour in the php code. But the keys aren't being reset is the issue I'm trying to solve. Memcached doesn't need to be reset, just the keys/values. –  Jhouse153 Apr 4 '13 at 15:08
2  
Inelegance is not the question there... but expiring all of a cache at one point in time is a good way to stampede the application under heavy load. –  rackandboneman Apr 4 '13 at 15:16
1  
I won't comment on the why, but have a look at the PID recorded in /var/run/memcached (or similar) then compare it to the running PID of memcached. –  NickW Apr 4 '13 at 15:45
    
Thank you for responding to the question Nick. That is one thing I've noticed. The memcached.pid is empty, I'm assuming it shouldn't be. –  Jhouse153 Apr 4 '13 at 15:54

Your Answer

 
discard

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

Browse other questions tagged or ask your own question.