Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unplug the ethernet cable from the server while the client is writing entries to the memcacheD,client will hang for 10+seconds,same like " Failover issue(issue#23)" #63

Open
judybuaa opened this issue Jun 18, 2013 · 0 comments

Comments

@judybuaa
Copy link

Hi,our configuration is as follow:
SchoonerSockIOPool pool = SchoonerSockIOPool.getInstance(poolName);
pool.setServers(hostAndPort);
pool.setWeights(hostWeight);
pool.setInitConn(20);
pool.setMinConn(20);
pool.setMaxConn(250);
pool.setMaxIdle(86400000);
pool.setMaintSleep(30);
pool.setNagle(false);
pool.setSocketTO(3000);
pool.setSocketConnectTO(300);
pool.setHashingAlg(SockIOPool.CONSISTENT_HASH);
pool.setFailover(true);
pool.setFailback(true);

our operation step is as follow:
1.install and start memcached-1.4.7 on two servers,the client's version is 2.6.2
2.put a breakpoint at line 682 of AscIIClient
682 sock.writeBuf.clear();
3.start the client to get somekey we put in on server successully
while the program is run at the breakpoint, I unplug the ethernet cable (or reboot),then after 1520 sec,I receive the following exception
89448 [main] ERROR com.danga.MemCached.MemCachedClient - ++++ exception thrown while trying to get object from cache for key: memcache_not_return_key1
389448 [main] ERROR com.danga.MemCached.MemCachedClient - 您的主机中的软件中止了一个已建立的连接。
java.io.IOException: 您的主机中的软件中止了一个已建立的连接。
at sun.nio.ch.SocketDispatcher.read0(Native Method)
at sun.nio.ch.SocketDispatcher.read(SocketDispatcher.java:25)
at sun.nio.ch.IOUtil.readIntoNativeBuffer(IOUtil.java:198)
at sun.nio.ch.IOUtil.read(IOUtil.java:166)
at sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:243)
at com.schooner.MemCached.SockInputStream.(SockInputStream.java:84)
at com.schooner.MemCached.AscIIClient.get(AscIIClient.java:693)
at com.schooner.MemCached.AscIIClient.get(AscIIClient.java:610)
at com.schooner.MemCached.AscIIClient.get(AscIIClient.java:606)
at com.danga.MemCached.MemCachedClient.get(MemCachedClient.java:917)
.....
So my question is why there will be 5
20 sec before the exception throw rather than 300ms I set(pool.setSocketConnectTO(300)) or default 3seconds before?

I saw issue#23, your answer is as follow:

Don't use the following api:
pool.setMaintSleep
pool.setSocketTO
pool.setSocketConnectTO
pool.setMaxIdle
pool.setAliveCheck

But it still not working,I tried 2.6.5, the result is same

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant