addServer Minimum timeout
dormando at rydia.net
Mon Jun 23 21:38:01 UTC 2008
We get a lot of these reports (almost solely with php clients?). However
it's not entirely clear where the problem is.
Anyone want to volunteer to add better instrumentation into the php
clients, or do some work help add to the wiki FAQ on troubleshooting
Benjamin, when you get the timeouts, is it just one or two specific
requests that time out, or do *no* requests work for 500ms-1000ms from
If it's not that exact problem, it's either a weird connect bug in
memcached, soemthing between the client and the server, or a bug in the
client itself. I know the client's had a number of bugs, so if you're
using pecl/memcache, please upgrade to the latest stable and try again.
Are you running 'stats sizes' or any other oddball commands routinely?
'stats sizes' can pause your cache up to several seconds.
I've chased down a few of these with posters without a huge amount of luck:
- Sometimes there weren't enough fd's available to the instance or the
- Sometimes a firewall was in the way which would drop connection
packets (most common problem).
- Old pecl/memcache client.
Benjamin Fonze wrote:
> Well, I'm using the cache very intensively. Doing about 1,000+
> requests/second. Memcached seem to be running fine most of the time, but
> sometimes it just let the request hang and timeout after 1 second. With
> so many queries/second, when it hangs, it quickly makes a lot of Apache
> "waiting" and eventually completely overload the web servers.
> I'm now trying with one big cache on a single server, and it seems to
> run better. The Memcached server is not loaded at all. Still sometimes
> the request take 500ms or even do some timeouts.
> Is 1,000+ hits per second a lot for Memcached or is it still a normal usage?
> On Mon, Jun 23, 2008 at 7:32 AM, Brian Moon <brianm at dealnews.com
> <mailto:brianm at dealnews.com>> wrote:
> The timeout value for addServer(...) being an integer, the minimum
> timeout seem to be 1 second. But using 5 servers, 1 second per
> server is
> pretty long if all memcached are down.
> It will hang for 5 seconds. The normal connection time being
> much lower
> than 1 second, is there a way to have a lower timeout? Like 200ms?
> Well, if the memcached daemons are down, you will get an immediate
> failure. If the hardware is offline completely, it could be an
> issue. But, IMO, if you have even 2 of 5 servers offline at the same
> time, you have bigger issues than a 1 second timeout.
> Are you experiencing a problem? Or is this just a worry? Memcached
> has worked just fine for us and many many others with a 1 second
> Brian Moon
> Senior Developer/Engineer
> When you care enough to spend the very least.
> Benjamin Fonze | CEO ExoClick.com
> Mobile: +34-671-646725
> ICQ: 110307267
> Web: www.exoclick.com <http://www.exoclick.com>
More information about the memcached