httpd-modules-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joshua Marantz <jmara...@google.com>
Subject apr_memcache operation timeouts
Date Wed, 17 Oct 2012 19:36:30 GMT
Is there a mechanism to time out individual operations?

If memcached freezes, then it appears my calls to 'get' will block until
memcached wakes up.  Is there any way to set a timeout for that call?

I can repro this in my unit tests by sending a SIGSTOP to memcached before
doing a 'get'?

Here are my observations:

apr_memcache_multgetp seems to time out in bounded time if I SIGSTOP the
memcached process. Yes!

apr_memcache_getp seems to hang indefinitely if I SIGSTOP the memcached
process.

apr_memcache_set seems to hang indefinitely if I SIGSTOP the memcached
process.

apr_memcache_delete seems to hang indefinitely if I SIGSTOP the memcached
process.

apr_memcache_stats seems to hang indefinitely if I SIGSTOP the memcached
process.

That last one really sucks as I am using that to print the status of all my
cache shards to the log file if I detected a problem :(


Why does apr_memcache_multgetp do what I want and not the others?  Can I
induce the others to have reasonable timeout behavior?

When I SIGSTOP memcached this makes it hard to even restart Apache, at
least with graceful-stop.


On a related note, the apr_memcache
documentation<http://apr.apache.org/docs/apr-util/1.4/group___a_p_r___util___m_c.html>is
very thin.  I'd be happy to augment it with my observations on its
usage
and the meaning of some of the arguments if that was desired.  How would I
go about that?

-Josh

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message