Issue 250 in memcached: scritps/memcached-init script does not restart reliably

21 views
Skip to first unread message

memc...@googlecode.com

unread,
Feb 9, 2012, 6:33:57 PM2/9/12
to memc...@googlegroups.com
Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 250 by superama...@gmail.com: scritps/memcached-init script does
not restart reliably
http://code.google.com/p/memcached/issues/detail?id=250

# This is only pertinent on Debian and Ubuntu systems:
1. install memcached and python-memcache
2. edit /etc/memcached.conf and change -m 64 to -m 640
3. sudo service memcached restart
4. Run the following test script with '300000' as an argument

#!/usr/bin/python

import memcache
import sys

mc = memcache.Client(['127.0.0.1:11211'], debug=1)

i=0
while i < int(sys.argv[1]):
mc.set("key_%09d" % i, "A" * 1024)
i += 1

5. Run the script again, with 1000000 with & to background it
6. sudo service memcached restart
7. verify that memcached is running (pidof memcached). If it is not, then
this bug exists.

As this is a race condition, you may have to repeat steps 4 through 7 a few
times before you reproduce the issue. On precise, it took about 15 tries.
If you have the older version of /etc/init.d/memcached which does 'sleep 1'
in it, then you can make it more likely by removing the sleep 1.

What version of the product are you using? On what operating system?
This has been verified up to 1.4.13 on the dev release of precise


Please provide any additional information below.

This was originally reported in Ubuntu:

http://pad.lv/795673


Attachments:
50_add_init_retry.patch 1.2 KB

memc...@googlecode.com

unread,
Jul 29, 2012, 7:11:10 PM7/29/12
to memc...@googlegroups.com
Updates:
Status: Accepted

Comment #1 on issue 250 by dorma...@rydia.net: scritps/memcached-init
I was just about to apply this, but suddenly I have the thinking that
--retry doesn't exist on all platforms, which is why the sleep is in there.

Can anyone confirm this? Like SuSE or fedora not having it? I'm googling a
bit and it seems to be that way.

...or if I'm being paranoid we can throw it in...

Reply all
Reply to author
Forward
0 new messages