memcache报错

这几天线上的memcache在频繁的报错,查了很多文章竟然都没有找到解决方法,最后终于找到了原因,以前也解决过,但是因为没有记录下来就又忘记解决方法了

Mon Jun 09 11:54:55 CST 2014 - ++++ failed to close SockIO obj from deadPool
com.danga.MemCached.SockIOPool Mon Jun 09 11:54:55 CST 2014 - ++++ socket or its streams already null in trueClose call
java.io.IOException: ++++ socket or its streams already null in trueClose call
        at com.danga.MemCached.SockIOPool$SockIO.trueClose(SockIOPool.java:1704)
        at com.danga.MemCached.SockIOPool.selfMaint(SockIOPool.java:1432)
        at com.danga.MemCached.SockIOPool$MaintThread.run(SockIOPool.java:1497)
com.danga.MemCached.SockIOPool Mon Jun 09 11:54:55 CST 2014 - ++++ failed to close SockIO obj from deadPool
com.danga.MemCached.SockIOPool Mon Jun 09 11:54:55 CST 2014 - ++++ socket or its streams already null in trueClose call
java.io.IOException: ++++ socket or its streams already null in trueClose call
        at com.danga.MemCached.SockIOPool$SockIO.trueClose(SockIOPool.java:1704)

最终的解决方法就是

/usr/local/bin/memcached -d -m 200 -u root -l 127.0.0.1 -p 11211 -c 2560 -P /tmp/memcached.pid

将-m和-c调大就ok了

猜你喜欢

转载自cailin.iteye.com/blog/2077437