Status: New
Owner: ----
Labels: Type-Defect Priority-Medium
New issue 250 by [email protected]: 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