Git Product home page Git Product logo

Comments (6)

GoogleCodeExporter avatar GoogleCodeExporter commented on June 9, 2024
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.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 9, 2024
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.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 9, 2024
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.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 9, 2024
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.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 9, 2024
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.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 9, 2024
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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.