<div>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">If you're using persistent connections, that server will still<br>be flagged as down on subsequent requests and will be skipped immediately.
</blockquote></div>
<div> </div>
<div>I see that you can set persistent connections with "pconnect". However are there downsides to this? Suppose a downed server comes back online. Using a persistent connection, would my app know about this?
</div>
<div> </div>
<div> </div>
<div> </div>
<div> </div>
<div><br><br> </div>
<div><span class="gmail_quote">On 10/27/07, <b class="gmail_sendername">Mikael Johansson</b> <<a href="mailto:mikael@synd.info">mikael@synd.info</a>> wrote:</span>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">Hi,<br><br>The default connection timeout in pecl/memcache is 1 second, and when<br>using Memcache::addServer() the connection isn't established until the
<br>first command is sent (ie. the "get" in your example). Perhaps you have<br>added several servers, one of which is unreachable, and thus the client<br>will stall 1 second before flagging that server as down and trying the
<br>next one. If you're using persistent connections, that server will still<br>be flagged as down on subsequent requests and will be skipped immediately.<br><br>Or as Marc said, the client might indeed be waiting for a DNS response..
<br><br>//Mikael<br><br>K J wrote:<br>> The slowdown is almost certainly in your client library. The server, on<br>> our systems, takes about 1.5 milliseconds to start up, and a<br>> fraction of<br>> a millisecond to answer the first request. But your client might be
<br>> doing a lot of work the first time it executes. You didn't say what your<br>> client language and environment is, so it's kind of hard to even take a<br>> useful guess.<br>><br>><br>
> The app is running on PHP and is using the PHP memcache library:<br>> <a href="http://cn2.php.net/manual/en/ref.memcache.php">http://cn2.php.net/manual/en/ref.memcache.php</a><br>><br>> I record the time it takes to render a page, and every page ends up
<br>> taking 1 second or so. Most of that 1 second is due to the very first<br>> memcache get request. It happens at every page that uses memcache. The<br>> only time this problem goes away is when I run a load testing tool and
<br>> start having multiple users hit the system constantly.<br>><br>><br>><br>><br>> On 10/27/07, *Steven Grimm* <<a href="mailto:sgrimm@facebook.com">sgrimm@facebook.com</a><br>> <mailto:<a href="mailto:sgrimm@facebook.com">
sgrimm@facebook.com</a>>> wrote:<br>><br>> K J wrote:<br>> > So it's normal to have Memcache's response time be 1 second, if the<br>> > system is relatively idle? This happens when I'm basically the only
<br>> > user on the system, logging in, checking pages, etc.<br>><br>> The slowdown is almost certainly in your client library. The server, on<br>> our systems, takes about 1.5 milliseconds to start up, and a fraction of
<br>> a millisecond to answer the first request. But your client might be<br>> doing a lot of work the first time it executes. You didn't say what your<br>> client language and environment is, so it's kind of hard to even take a
<br>> useful guess.<br>><br>> -Steve<br>><br>><br><br><br></blockquote></div><br>