Comments (4)
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:
-
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 thoseRedis(EndOfStream)
errors returned. (See also: #30 I'm planning on changing this slightly to be more obvious in a future release.) -
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. -
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.
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.
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.
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)
- How to send the 'eval' command HOT 2
- how to connect redis with password HOT 2
- Internal("Subscription failed, try again later...") on pubsub HOT 2
- Please support redis specify password and databese HOT 1
- PoisonError in reconnect.rs HOT 9
- How to test that `PubsubConnection` is still working? HOT 2
- Make Tokio 1.0 the default? HOT 2
- Sentinel support HOT 3
- thread 'main' panicked at 'there is no reactor running, must be called from the context of a Tokio 1.x runtime', /root/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.4.0/src/runtime/context.rs:37:26 HOT 6
- Support for explicit pipelining HOT 2
- subscribe to multiple channels in same stream? HOT 1
- EXPIRE not working? HOT 1
- README link to pubsub example broken HOT 1
- Pub/Sub Connection Drops When no (P)Subscribers Remain HOT 2
- PubsubStream Drop impl Calls Unsubscribe HOT 2
- Would be good to have changelog for releases
- Pub/Sub error: Unexpected("PUBSUB message should be encoded as an array") HOT 6
- What is our reconnect mechanism like? HOT 1
- What is our reconnect mechanism like? HOT 1
- v0.17.0 broken build HOT 3
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 redis-async-rs.