I figured this out before finding the FAQ and it works great. I hear
CPAN has a package for this too if you happen to work in Perl.
Then you are hosed. How long will you be keeping locks open?
--
Brian Moon
Senior Web Engineer
------------------------------
When you care enough to spend the very least.
http://dealnews.com/
Sure, that is what happens when you use a tool (memcached) outside of
its intended scope. So, if your locks are mission critical, memcached
is not a good solution to your problem. If locks are just a luxury like
someone else talked about, then memcached may fill the hole.
Now I'm not saying that it's perfect, and I've designed my locking to
be ok if it looses a lock or if the cache is flushed or ..., but that
doesn't mean it's "unreliable".
In my case my process that has a lock continually checks to confirm
that it has the lock, and as soon as it notices that it's lost the
lock (because of a cache flush or otherwise) it goes back to the step
of acquiring it again. (this also keeps the lock from being evicted,
along with other processes checking it)
so yes there are special constraints in dealing with this type of
lock, but i think those of us on this list should be careful about
trying to scare others away from using memcached like this by saying
it's "unreliable" or that you'll be "hosed". It's a very useful way to
use memcached even if it isn't how we all expect it to be used.
--
Jehiah
Jehiah Czebotar wrote:
> and i have never had memcached crash on me, so it's ok there.
Wow, you're lucky. Even since we've been on 1.2.5 we still see 2-3
daemon crashes a day. We used to have each daemon crash multiple times a
day while we were running 1.2.0.
Speaking of which, anyone have some tips on how I might debug what is
causing memcached to fail? I really hate having vital production daemons
go down :-( Ideally something "after the fact" as this is happening in
production with very high volumes that I could not replicate in a test
environment and even if I did try in a test environment I haven't the
slightest clue yet as to what may be the culprit and hence what to test.
- --
RJ Lalumiere
Linux System Administrator
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFIiniDRWtiNvkTA9cRAvW1AJ4pePbvJAaeIeLTyqRjchiaJ2oWkACfZfI4
orFRkr+6ZzPCjc61/eFJZG8=
=jo9/
-----END PGP SIGNATURE-----
Have you previously reported these crashes to the list anywhere?
-Dormando
well... being on this list gives me enough information to pick and
choose which releases I upgrade to when I don't want to be on the
bleeding edge. I am still happily running 1.2.1, and was looking to
upgrade to 1.2.5 but held off because of some of the reported bugs.
1.2.6 is looking promising though.
--
Jehiah
dormando wrote:
> Try 1.2.6-rc1 on one of your servers. It's mostly bug/crash fixes.
Yeah, I considered doing so on one of the more problematic servers, but
was kinda of reticent to put something not yet up to a "stable" release
into production. Hearing that 1.2.6 is mostly bug fixes certainly gives
me some incentive to test it out however.
I'll try it out next week on one server and see if crash frequency
reduces. The funny thing is that it definitely affects some of our
servers while others are happy as clams which makes me wonder if some of
our specific keys are triggering a bug.
> Have you previously reported these crashes to the list anywhere?
Nope, 1st and 2nd posts :P
- --
RJ Lalumiere
Linux System Administrator
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFIioB1RWtiNvkTA9cRAqhoAJ4s/Wk535u2xn52KPKdKX/YfvfX1QCfWZyw
yZ7IiZuvcEGKv11FW3uplvE=
=L4eA
-----END PGP SIGNATURE-----
Ok, this is nice to hear. I can be more clear about testing in the
future. In general if you're having crashes like that you should try the
latest stable tree on one of them, report bugs, etc. 1.2.6-rc1's tree has
been almost unchanged for a while now.
One of the things that helps us stamp -rc's and -dev trees as final
releases is people who're actively having problems trying out the code and
letting us know if it fixes issues for them.
>> Have you previously reported these crashes to the list anywhere?
>
> Nope, 1st and 2nd posts :P
Be noisy. It helps fuel our guilt.
-Dormando
what kind OS/kernel do you have?
what were the compile parameters for memcached (-O666 can crash holy
applications)
are you familiar with debuggers to able to help the developer to fix the
issue?
http://www.ibm.com/developerworks/linux/library/l-debug/
etc.
regards,
lix