Git Product home page Git Product logo

Comments (4)

benashford avatar benashford commented on June 4, 2024

Hello,

Thanks for the report.

Looking at the code, nothing stands out as being a single obvious problem. I use BLPOP in a private codebase that uses this library in a similar configuration to this, so that particular command is (in-principal) fine. There must be something else going on here...

Some potential things that might be an issue:

  1. Can we be sure the Redis server is still running? The Tokio log-message dropping I/O source can be seen when the connection has dropped. The library will attempt to re-connect, but until it has completed the reconnection you'll get those Redis(EndOfStream) errors returned. (See also: #30 I'm planning on changing this slightly to be more obvious in a future release.)

  2. The connection must have initially worked as the Redis(Remote("ERR Protocol error: expected \'$\', got \':\'")) log message is a remote error, the text is produced by the Redis server.

  3. It looks like you are using Futures 0.3 with 0.1 compatibility shims? I haven't tested with this configuration, so there's a chance there's an undiagnosed problem there, but I'm not expecting there to be any.

Regarding point 2 - the error is saying Redis received an integer when it was expecting a String. This is probably line 88 in your example, BLPOP expects the timeout value to be a String, if you replace 0 with "0" that error should go away. Although this shouldn't fix the other problems you've seen, if it does, then there's a bug in how errors are handled.

from redis-async-rs.

Texlo-Dev avatar Texlo-Dev commented on June 4, 2024

Hi Ben,
So I ensured that the Redis server was running, and the compatibility shims are fine. Once I replaced the 0 with a string "0", the error went away!

All in all, it seems like the BLPOP value must be a string, otherwise the Redis server will error. So this does support your theory of a bug in error handling.

from redis-async-rs.

benashford avatar benashford commented on June 4, 2024

Cool, thanks for confirming. All errors seem to be dropping the Redis connection rather than just I/O errors.

I'll leave this issue open to track that until it's fixed.

from redis-async-rs.

benashford avatar benashford commented on June 4, 2024

The recently released 0.5.0 version now only drops the Redis connection on specific errors rather than all errors. This means that ERR messages from the Redis server will keep the connection in-tact.

from redis-async-rs.

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.