Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Question About using MemcachedClient coming with 100% cpu problem

Reply
Thread Tools

Question About using MemcachedClient coming with 100% cpu problem

 
 
lightning
Guest
Posts: n/a
 
      10-24-2008
When using net.spy.memcached, I come with this problem, I use
MemcachedClient.get to get from memcached,but sometimes my app logs
exception info below and the cpu goes 100%.


the code I use to call mc:

long userid = -1;
Object obj = mc1.get(id);
if(obj ==null){
obj = mc2.get(id);
}

I did not catch the OperationTimeoutException and I just log every
exception because I don't know what else need to do to make everything
end peacefully.

the log is as below:




2008-10-23 20:20:21.045 INFO net.spy.memcached.MemcachedConnection:
Reconnecting due to exception on {QA sa=/10.23.245.184:11212
, #Rops=2, #Wops=0, #iq=0,
topRop=net.spy.memcached.protocol.ascii.GetOperati onImpl@1e5e28f,
topWop=null, toWrite=43, interested=
5}
java.io.IOException: Broken pipe
at sun.nio.ch.FileDispatcher.write0(Native Method)
at sun.nio.ch.SocketDispatcher.write(SocketDispatcher .java:29)
at sun.nio.ch.IOUtil.writeFromNativeBuffer(IOUtil.jav a:104)
at sun.nio.ch.IOUtil.write(IOUtil.java:75)
at sun.nio.ch.SocketChannelImpl.write(SocketChannelIm pl.java:
302)
at
net.spy.memcached.protocol.TCPMemcachedNodeImpl.wr iteSome(TCPMemcachedNodeImpl.java:
360)
at
net.spy.memcached.MemcachedConnection.handleWrites (MemcachedConnection.java:
283)
at
net.spy.memcached.MemcachedConnection.handleIO(Mem cachedConnection.java:
265)
at
net.spy.memcached.MemcachedConnection.handleIO(Mem cachedConnection.java:
182)
at net.spy.memcached.MemcachedClient.run(MemcachedCli ent.java:
1259)
2008-10-23 20:20:21.045 WARN net.spy.memcached.MemcachedConnection:
Closing, and reopening {QA sa=/10.23.245.184:11212, #Rops=2,
#Wops=0, #iq=0,
topRop=net.spy.memcached.protocol.ascii.GetOperati onImpl@1e5e28f,
topWop=null, toWrite=43, interested=5}, attemp
t 0.
2008-10-23 20:20:21.046 WARN
net.spy.memcached.protocol.ascii.AsciiMemcachedNod eImpl: Discarding
partially completed op: net.spy
..memcached.protocol.ascii.GetOperationImpl@1e5e28 f
2008-10-23 20:20:21.046 WARN
net.spy.memcached.protocol.ascii.AsciiMemcachedNod eImpl: Discarding
partially completed op: net.spy
..memcached.protocol.ascii.GetOperationImpl@17d1f5 c
2008-10-23 20:20:21,046 [http-8080-Processor24] ERROR [/fc-mc].
[action] (StandardWrapperValve.java:260) - Servlet.service() f
or servlet action threw exception
java.lang.RuntimeException: Exception waiting for value
at net.spy.memcached.MemcachedClient.get(MemcachedCli ent.java:
769)
at net.spy.memcached.MemcachedClient.get(MemcachedCli ent.java:
784)
at
com.baidu.fengchao.earth.memcache.SessionService.g etUserid(SessionService.java:
253)
at
com.baidu.fengchao.mercury.web.util.SessionCmd.get Adminid(Unknown
Source)
at
com.baidu.fengchao.mercury.web.util.EnvSetterFilte r.doFilter(Unknown
Source)
at
org.apache.catalina.core.ApplicationFilterChain.in ternalDoFilter(ApplicationFilterChain.java:
202)
at
org.apache.catalina.core.ApplicationFilterChain.do Filter(ApplicationFilterChain.java:
173)
at
com.baidu.fengchao.mercury.web.util.PathFilter.doF ilter(Unknown
Source)
at
org.apache.catalina.core.ApplicationFilterChain.in ternalDoFilter(ApplicationFilterChain.java:
202)
at
org.apache.catalina.core.ApplicationFilterChain.do Filter(ApplicationFilterChain.java:
173)
at
com.baidu.fengchao.mercury.web.util.SetCharacterEn codingFilter.doFilter(Unknown
Source)
at
org.apache.catalina.core.ApplicationFilterChain.in ternalDoFilter(ApplicationFilterChain.java:
202)
at
org.apache.catalina.core.ApplicationFilterChain.do Filter(ApplicationFilterChain.java:
173)
at
org.apache.catalina.core.StandardWrapperValve.invo ke(StandardWrapperValve.java:
213)
at
org.apache.catalina.core.StandardContextValve.invo ke(StandardContextValve.java:
17
at
org.apache.catalina.core.StandardHostValve.invoke( StandardHostValve.java:
126)
at
org.apache.catalina.valves.ErrorReportValve.invoke (ErrorReportValve.java:
105)
at
org.apache.catalina.core.StandardEngineValve.invok e(StandardEngineValve.java:
107)
at
org.apache.catalina.connector.CoyoteAdapter.servic e(CoyoteAdapter.java:
14
at
org.apache.coyote.http11.Http11Processor.process(H ttp11Processor.java:
869)
at org.apache.coyote.http11.Http11BaseProtocol
$Http11ConnectionHandler.processConnection(Http11B aseProtocol.java:
664)
at
org.apache.tomcat.util.net.PoolTcpEndpoint.process Socket(PoolTcpEndpoint.java:
527)
at
org.apache.tomcat.util.net.LeaderFollowerWorkerThr ead.runIt(LeaderFollowerWorkerThread.java:
80)
at org.apache.tomcat.util.threads.ThreadPool
$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Thread.java:595)
Caused by: java.util.concurrent.ExecutionException:
java.lang.RuntimeException: Cancelled
at net.spy.memcached.MemcachedClient
$OperationFuture.get(MemcachedClient.java:1443)
at net.spy.memcached.MemcachedClient.get(MemcachedCli ent.java:
764)
... 24 more
Caused by: java.lang.RuntimeException: Cancelled
... 26 more
2008-10-23 20:20:21.149 INFO net.spy.memcached.MemcachedConnection:
Reconnecting {QA sa=/10.23.245.184:11212, #Rops=0, #Wops=0,
#iq=0, topRop=null, topWop=null, toWrite=0, interested=0}
2008-10-23 20:20:21.149 INFO net.spy.memcached.MemcachedConnection:
Connection state changed for sun.nio.ch.SelectionKeyImpl@195
fbd6
2008-10-23 20:28:09,756 [http-8080-Processor19] INFO
util.EnvSetterFilter ( ?) - request userid: 265045
2008-10-23 20:28:09.757 INFO net.spy.memcached.MemcachedConnection:
Reconnecting due to exception on {QA sa=/10.23.244.207:11212
, #Rops=2, #Wops=0, #iq=0,
topRop=net.spy.memcached.protocol.ascii.StoreOpera tionImpl@782d55,
topWop=null, toWrite=317, intereste
d=5}
java.io.IOException: Broken pipe
at sun.nio.ch.FileDispatcher.write0(Native Method)
at sun.nio.ch.SocketDispatcher.write(SocketDispatcher .java:29)
at sun.nio.ch.IOUtil.writeFromNativeBuffer(IOUtil.jav a:104)
at sun.nio.ch.IOUtil.write(IOUtil.java:75)
at sun.nio.ch.SocketChannelImpl.write(SocketChannelIm pl.java:
302)
at
net.spy.memcached.protocol.TCPMemcachedNodeImpl.wr iteSome(TCPMemcachedNodeImpl.java:
360)
at
net.spy.memcached.MemcachedConnection.handleWrites (MemcachedConnection.java:
283)
at
net.spy.memcached.MemcachedConnection.handleIO(Mem cachedConnection.java:
265)
at
net.spy.memcached.MemcachedConnection.handleIO(Mem cachedConnection.java:
182)
at net.spy.memcached.MemcachedClient.run(MemcachedCli ent.java:
1259)
2008-10-23 20:28:09.758 WARN net.spy.memcached.MemcachedConnection:
Closing, and reopening {QA sa=/10.23.244.207:11212, #Rops=2,
#Wops=0, #iq=0,
topRop=net.spy.memcached.protocol.ascii.StoreOpera tionImpl@782d55,
topWop=null, toWrite=317, interested=5}, atte
mpt 0.
2008-10-23 20:28:09.758 WARN
net.spy.memcached.protocol.ascii.AsciiMemcachedNod eImpl: Discarding
partially completed op: net.spy
..memcached.protocol.ascii.StoreOperationImpl@782d 55
2008-10-23 20:28:09.758 WARN
net.spy.memcached.protocol.ascii.AsciiMemcachedNod eImpl: Discarding
partially completed op: net.spy
..memcached.protocol.ascii.StoreOperationImpl@1e83 3ff
2008-10-23 20:28:09,765 [http-8080-Processor19] INFO
util.EnvSetterFilter ( ?) - [fc-star-mecury] -
172.18.110.
176 - /fc-mc/spread/AdPreview.do
2008-10-23 20:28:09.861 INFO net.spy.memcached.MemcachedConnection:
Reconnecting {QA sa=/10.23.244.207:11212, #Rops=0, #Wops=0,
#iq=0, topRop=null, topWop=null, toWrite=0, interested=0}
2008-10-23 20:28:09.861 INFO net.spy.memcached.MemcachedConnection:
Connection state changed for sun.nio.ch.SelectionKeyImpl@1f5
b5a6
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Tetration (print 100^100^100^100^100^100^100^100^100^100^100^100^100^100) jononanon@googlemail.com C Programming 5 04-25-2012 08:49 PM
PyCon is Coming! PyCon is Coming! Steve Holden Python 0 01-05-2006 11:53 AM
100% TABLE + 100% ROW + 100% DIV..? fred Javascript 3 03-17-2005 04:25 AM



Advertisments