memcached restart starts a new memcached and doesn't kill the old one -


I am running my folders in different folders in production mode and in staging mode on the same server. They both use the memcache client, which must run memcached.

So far I have not installed a deployed script and therefore manually deploy a server properly by sshing on the server, going to the appropriate directory, updating the code, restarting the memcache, and then unicorning (Processes that actually run Rails applications) restart I restart the lamb in this way:

  sudo /etc/init.d/memcached restart & amp;  

It starts a new memcatch, but it does not kill the old: see it:

  ip- & lt; An-ip & gt ;: test.millionaire [themes] $ ps afx | Grep memcache 11176 pts / 2 S + 0:00 | \ _Grep --color = Auto memcache 10939 points / 3R 8:13 \ _sudo /etc/init.d/memcached restart 7453? SL 0:00 / USR / bin / MAMCACH-M64-P111111-U AN-L 127.0.0.1 IP- & lt; An-ip & gt ;: test Millionaire [topics] $ sudo /etc/init.d/memcached restart & amp; [1] 11187 IP- & lt; An-ip & gt;: test.millionaire [topics] $ ps afx | Grep memcache 11187 points / 2 T. 0:00 | \ _Sudo /etc/init.d/memcached restart 11199 points / 2s + 0:00 | \ _Grep --color = Auto memcache 10939 points / 3R8:36 \ _ sudo /etc/init.d/memcached restart 7453? Sl 0:00 / usr / bin / memcached -m 64-p 11211 -u none-l 127.0.0.1 [1] + Studio /etc/init.d/memcached restart ip- & lt; An-ip & gt;: test millionaire [topics] $ sudo /etc/init.d/memcached restart & amp; [2] 11208 IP- & lt; An-ip & gt;: test.millionaire [topics] $ ps afx | Grep memcache 11187 points / 2 T. 0:00 | \ _Sudo /etc/init.d/memcached restart 11208 points / 2R0:01 | \ _Sudo /etc/init.d/memcached restart 11218 pts / 2 S + 0:00 | \ _Grep --color = Auto memcache 10939 points / 3R8:42 \ _ sudo /etc/init.d/memcached restart 7453? SL 0:00 / usr / bin / memcached -m 64-p 11211 -u none-l 127.0.0.1  

This may be the reason that another memacate is going on - See the bottom line. I suspect where it is from and my tendency is to kill it, but I think I know more about Mamkachad with someone who knows better than anyone.

Thank you for any advice - Max

Edit - Solution

I found out after some work of spying with a colleague. In the rail I printed a hash of values ​​called CCE Stats, in the Rail, which includes "Pides", which I could see was set for instance of Memkach which did not start with the Memcatch restart, i.e. This process:

  7453? Slay 0:00 / USR / Bin / Memcatch-M64-P111111 -U A-L 127.0.0.1  

Memcached control script (i.e. defines start, stop and restart To order), has /etc/init.d/memcached

in it is a line

  # edit / etc / default Change it on / memcached. ENABLE_MEMCACHED = No  

so I looked in / etc / default / memcached , which was set to ENABLE_MEMCACHED = no

So, it was basically preventing the prevention and starting of blocking of the mamcatch. I changed it to ENABLE_MEMCACHED = yes , then it will stop and start right. Now when I stop and start memcached, it is the above process, memcached in use, that has stopped and started

Try experimenting:

  killall memcached  

Comments