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)
- State the dependencies in the pom file HOT 5
- Multhreaded implementation with SASL support not working. HOT 1
- Operation class is used in un-threadsafe, unsynchronized manner. HOT 4
- Inside TCPMemcachedNodeImpl, use direct buffers HOT 4
- Stability problems in async I/O HOT 4
- assertion failure during ConsistentHashingTest HOT 1
- incr/decr parameter "by" should be a long, not an int HOT 9
- Zlib encoding/binary access HOT 3
- getBulk() logs a warning when no keys are in the cache HOT 3
- bug in OperationImpl HOT 6
- get(long timeout, TimeUnit unit) may take longer than given timeout HOT 3
- IllegalArgumentException after Switching from SpyMemcached 2.7 to 2.7.1 HOT 2
- "unl" unlock operation is not implemented on MembaseClient HOT 9
- 2.7.1 jar for download corrupt? HOT 5
- Callback support HOT 11
- Get canceled HOT 5
- CAS operation fails due to client sign-extending the CAS value HOT 1
- warning for "handling node for operation is not set" if any server is down HOT 4
- javadoc warnings from tap and vbucket classes HOT 3
- CASMutator removes expiry on mutated items
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.