Comments (6)
Can you show the code you have that demonstrates this test?
Also tell me what version of the client you're running.
The shutting down messages aren't entirely abnormal.
Original comment by [email protected]
on 24 Jan 2009 at 1:29
from spymemcached.
I'm marking this as NeedInfo which effectively closes it since there doesn't
seem to
be enough information for me to act upon.
Please supply a small piece of code that reliably reproduces this problem. I
can
imagine ways to misuse the API that might lead to it, but I don't know exactly
how to
produce what you're seeing.
Original comment by [email protected]
on 26 Jan 2009 at 5:46
- Changed state: NeedInfo
from spymemcached.
HI
I am using memcached-2[1].1.jar and spy-2.4.jar..
My code is look like below..
here i have 2 memcache servers and i m setting my key-value in both
servers...and
after setting value i m shutting down memcache client object..but getting
intermittent specified exception..
for(int i=0;i<totalServers.length;i++){
try{
String serverPort[] = totalServers[i].split(":");
MemcachedClient memCachedClient = new MemcachedClient
(new InetSocketAddress(serverPort[0],Integer.parseInt(serverPort[1])));
Future f;
try {
f = memCachedClient.set(aSessionId,
Integer.parseInt(PropsUtil.get(AsitePropsKeys.SESSION_TIMEOUT_DURATION))*60,
user_info);
Object o = f.get(2,TimeUnit.SECONDS);
}
catch (InterruptedException e) {
log.error("InterruptedException in set key
in server="+aSessionId);
// TODO Auto-generated catch block
e.printStackTrace();
} catch (ExecutionException e) {
log.error("ExecutionException in set key in
server="+aSessionId);
// TODO Auto-generated catch block
e.printStackTrace();
} catch (TimeoutException e) {
log.error("TimeoutException in set key in
server="+aSessionId);
// TODO Auto-generated catch block
e.printStackTrace();
}
catch(Exception e){
log.error("Exception in set key in
server="+aSessionId);
e.printStackTrace();
} memCachedClient.shutdown();
}catch(Exception e){
log.debug("Exception in connection to
server"+e.getMessage());
//e.printStackTrace();
}
}
Original comment by [email protected]
on 25 Mar 2009 at 8:41
from spymemcached.
Yeah, you're shutting down connections a lot. You should keep the clients open
throughout the life of your application.
I'd recommend upgrading to the latest version (which doesn't require spy.jar)
and
don't shut them down so much. :)
Original comment by [email protected]
on 26 Mar 2009 at 1:47
- Changed state: Invalid
from spymemcached.
Hi,
Thanx for the reply..
in our case, if i dont call shutdown() method then it wud continously wait for
connection to be up..and i dont want that...
it keeps throwing below exception
2009-03-26 10:37:07,500 INFO [net.spy.memcached.MemcachedConnection]
Reconnecting
due to exception on {QA sa=jjoshi.asite.asitehq.com/192.168.100.94:11211,
#Rops=0,
#Wops=2, #iq=0, topRop=null,
topWop=net.spy.memcached.protocol.ascii.DeleteOperationImpl@e80a28, toWrite=0,
interested=0}
java.net.ConnectException: Connection refused: no further information
at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:574)
at net.spy.memcached.MemcachedConnection.handleIO
(MemcachedConnection.java:294)
at net.spy.memcached.MemcachedConnection.handleIO
(MemcachedConnection.java:192)
at net.spy.memcached.MemcachedClient.run(MemcachedClient.java:1444)
2009-03-26 10:37:07,500 WARN [net.spy.memcached.MemcachedConnection] Closing,
and
reopening {QA sa=jjoshi.asite.asitehq.com/192.168.100.94:11211, #Rops=0,
#Wops=2,
#iq=0, topRop=null,
topWop=net.spy.memcached.protocol.ascii.DeleteOperationImpl@e80a28, toWrite=0,
interested=0}, attempt 38.
In, my case i dont want this looping...
Original comment by [email protected]
on 26 Mar 2009 at 11:02
from spymemcached.
Look into FailureMode to define what you want to happen in that case.
Original comment by [email protected]
on 31 Mar 2009 at 5:16
from spymemcached.
Related Issues (20)
- NPE happening in TCPMemcachedNodeImpl.fillWriteBuffer under heavy load
- Memory Leak in LinkedBlockingQueue in AsciiMemcachedNodeImpl/TCPMemcachedNodeImpl
- JVM crashed always with Memcached IO over
- NPE
- Allow to configure MAX_CLONE_COUNT parameter
- CASMutator.cas should throw typed exception
- read/write queues are not being cleared incase of faulty server:port, proposed a fix
- How to get more two values using get(key) API ?
- Broken link on "Project Home"
- Memcache sets taking unusually long time HOT 1
- Unable to read Binary data (C Struct) from Memcache HOT 7
- MemcacheClient with SerializingTranscoder isn't thread safe
- Very big performance issue with large numbers of asyncGets
- java.lang.AssertionError: Unknown line type: STORED HOT 1
- can spymemcached cause race condition?
- Missing CAS API (With exp. time and without Transcoder) HOT 1
- Booleans contained in Clojure maps deserialized as new instances of java.lang.Boolean - breaks "if" HOT 1
- Client never connects with small timeout (auth problem)
- getBulk() doesn't use FailureMode HOT 3
- Set request fails after restarting the server HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from spymemcached.