how you fix this problem then? 在 2011年5月24日星期二UTC+8上午4时30分47秒,Antonio写道: > > Hello! > > I'm seeing seeing a very small (but significant) percentage of our > memcache get() requests taking just over 3 seconds to execute (about > 3.001-3.015 seconds). > > It seems to happen pretty randomly--and all the other requests take under > a millisecond. Whether or not the get request hits or misses seems to make > no difference. > > Some googling suggests that this delay might correspond to TCP SYN packets > being dropped and then resent. If that's the case, is there a way to time > out more quickly and either retry or fail (and hit the database)? > > Here's what we're running: > CentOS 5.6 > Memcached server: 1.4.5 (five 4GB instances on 5 web servers all on a > private network on the same rack) > Client: PECL Memcached PHP extension 1.0.2 (libmemcached 0.31) > Web server: Nginx 1.0.2 with php-fpm > > We're setting the following options: > $mc->setOption(Memcached::OPT_NO_BLOCK, true); > $mc->setOption(Memcached::OPT_TCP_NODELAY, true); > $mc->setOption(Memcached::OPT_POLL_TIMEOUT, 100); > $mc->setOption(Memcached::OPT_RETRY_TIMEOUT, 1); > $mc->setOption(Memcached::OPT_CONNECT_TIMEOUT, 100); > $mc->setOption(Memcached::OPT_LIBKETAMA_COMPATIBLE, true); > $mc->setOption(Memcached::OPT_DISTRIBUTION, > Memcached::DISTRIBUTION_CONSISTENT); > > Any ideas or insight would be much appreciated. > > Thanks, > Antonio >
-- --- You received this message because you are subscribed to the Google Groups "memcached" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
