Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to stop and restart memcached server?

Tags:

memcached

How to stop and restart memcached server 1.4.5 in linux OS from command line?

like image 610
smriti Avatar asked Jun 22 '10 19:06

smriti


People also ask

How do I stop memcached?

d/memcached stop (or the first part of /etc/init. d/memcached restart ) is failing. But then you go on to say that you need to run killall memcached to get it to stop.

How do I reset memcached?

Memcached flush_all command is used to delete all data (key-value pairs) from the Memcached server. It accepts an optional parameter called time that sets a time after which the Memcached data is to be cleared.

Does restarting memcached clear cache?

When you restart memcached, you lose all the content and it will need to be resourced (from the origin, wherever that is) when it is next requested.


2 Answers

Using root, try something like this:

/etc/init.d/memcached restart 
like image 157
pejuko Avatar answered Sep 18 '22 12:09

pejuko


Log in as root or do

su - 

Then:

service memcached restart 

If that doesn't work, then:

/etc/init.d/memcached restart 

It all depends on which Linux distro (or other OS) you're using.

like image 28
ajacian81 Avatar answered Sep 20 '22 12:09

ajacian81