Giter Site home page Giter Site logo

Comments (5)

alphazero avatar alphazero commented on June 24, 2024

Which version are you using?

IF you are using the last release (jars) let me know pull the latest sources and build. Connections now use heartbeat and you should not see any timeouts.

from jredis.

jabley avatar jabley commented on June 24, 2024

We're using this version - 0d25186

from jredis.

alphazero avatar alphazero commented on June 24, 2024

That has a heartbeat of one second so I don't see how it can be a timeout of an idle client. I think the issue may be that you are (yes?) using the AsyncConnection directly. Before instantiating the connection, set connection spec to Reliable:

ConnectionSpec spec = DefaultConnectionSpec.newSpec();
// .. set your normal spec options, e.g. credentials, db, etc.
// specify reliable connection
spec.isReliable(true);
AsynchConnection async = new AsychConnection(spec, isSharedFlag);

Let me know how that works out and I'll close this. Also curious as to why you are using the connection directly.

from jredis.

jabley avatar jabley commented on June 24, 2024

We're using it like this:

    ConnectionSpec connectionSpec = DefaultConnectionSpec.newSpec(host, port, 0, null);
    redis = new JRedisAsynchClient(connectionSpec);

When would someone not want a reliable connection? Maybe that should be the default setting?

from jredis.

alphazero avatar alphazero commented on June 24, 2024

There are a variety of reasons why you may want to have explicit control over reconnect behavior but the client should have defaulted to reliable.

http://github.com/alphazero/jredis/commit/92973d6680c14dafc37b05493869150446a634c6

from jredis.

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.