Known bug that should be fixed shortly. Client pool freaks out when all cache servers shut down.<br><br>gw<br><br><div><span class="gmail_quote">On 2/27/07, <b class="gmail_sendername">Mickey</b> <<a href="mailto:mickeypublic@gmail.com">
mickeypublic@gmail.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div>I use the memcached's java client 1.5 version(compile by
JDK1.5). But I encounter a problem:</div>
<div>When the memcached's server is closed, the client throw a exception (java.net.ConnectException: Connection refused: connect) and the thread be blocked, the cpu utilization achieve 100% . what should I do ? thanks
</div>
<div> </div>
<div>This is my code:</div>
<div> try {<br> <br> SockIOPool pool = SockIOPool.getInstance();<br> pool.setServers(new String[]{"localhost:11211"});<br> pool.setFailover(true);<br> pool.initialize();<br> MemCachedClient mc = new MemCachedClient();
<br> <br> while(true){<br> Thread.sleep(1000);<br> mc.set("abc", "abc");<br> System.out.println("Set");<br> String s = (String)mc.get("abc");<br> System.out.println
("cached:"+s);<br> break;<br> }<br> } catch (Throwable e) {<br> e.printStackTrace();<br> return;<br> }</div>
</blockquote></div><br><br clear="all"><br>-- <br>Greg Whalin