Comments (13)
I also get these Stream not writable errors
events:12
throw arguments[1];
^
Error: Stream is not writable
at Stream._writeOut (net:695:11)
at Stream.write (net:681:17)
at RedisClient.send_command (/usr/local/lib/node/.npm/redis/0.3.5/package/index.js:645:16)
at RedisClient.<anonymous> (/usr/local/lib/node/.npm/redis/0.3.5/package/index.js:718:27)
at Object.log (/home/skejti/Plateboiler-js/rapid.queue/logging.js:8:11)
at Object.info (/home/skejti/Plateboiler-js/rapid.queue/logging.js:13:45)
at Object.callback (/home/skejti/Plateboiler-js/rapid.queue/worker.js:19:11)
at RedisClient.return_reply (/usr/local/lib/node/.npm/redis/0.3.5/package/index.js:532:25)
at RedisReplyParser.<anonymous> (/usr/local/lib/node/.npm/redis/0.3.5/package/index.js:382:18)
at RedisReplyParser.emit (events:27:15)
from node-redis.
What version of node and what operating system are you using?
It looks like the connection to the server went away, but somehow we didn't notice it.
from node-redis.
node: 0.3.0-pre
redis: 2.0.1
Runing on a debian.
Could this also be connected to sporadic ECONNRESET errors? Is there anything I can do to alleviate the problem?
from node-redis.
Some questions: Is your Redis server on the same machine as your client? How many connections do you typically have open? Do you know if Redis is ever crashing and restarting?
It sounds like node_redis needs to handle this condition more gracefully, but the real issue is that your connections are getting reset at all.
from node-redis.
It's on the same machine. I have yet to notice redis crash, I'm not restarting it manually and running ps aux | grep redis tells me the redis-server process has been alive since Nov 02 (7 days).
There are around 30 clients connected at a time. When the process crashes the old clients disconnect right? Because the number is a bit high by my calculations.
For me personally the best solution would be if node_redis just quietly reconnected :)
Oh and I'm using the default redis configuration, I didn't touch a thing.
from node-redis.
node_redis should absolutely not crash, and it should reconnect if the connection goes away. I'll dig into that a little more.
If your connections are getting reset while going across the same machine, this is a potentially more serious problem. Yes, if node exits, then all of the TCP connections it opened are closed by the kernel. Redis server should be detecting this.
from node-redis.
By the way, is there a way I can wait until the redis command queue is empty before I go into the next iteration of executing tasks? I'm not sure if that can be related to the problem, but I certainly wouldn't like results dying upon crashes because they're in the queue.
from node-redis.
I just pushed a fix to the repo that should catch the most common of those write errors. Can you try it out and let me know if that fixes it? It's not in npm yet, but I can push it if installing from git is painful.
from node-redis.
I just pushed 0.3.7 that has added "idle" and "drain" events. I believe "idle" does what you are looking for.
from node-redis.
I did a git clone and then performed "npm install ."
Still got this error:
events:12
throw arguments[1];
^
Error: Stream is not writable
at Stream._writeOut (net:695:11)
at Stream.write (net:681:17)
at RedisClient.send_command (/usr/local/lib/node/.npm/redis/0.3.6/package/index.js:652:16)
at RedisClient. (/usr/local/lib/node/.npm/redis/0.3.6/package/index.js:723:27)
at Object.log (/home/skejti/Plateboiler-js/rapid.queue/logging.js:8:11)
at Object.info (/home/skejti/Plateboiler-js/rapid.queue/logging.js:13:45)
at Object.callback (/home/skejti/Plateboiler-js/rapid.queue/worker.js:19:11)
at RedisClient.return_reply (/usr/local/lib/node/.npm/redis/0.3.6/package/index.js:534:25)
at RedisReplyParser. (/usr/local/lib/node/.npm/redis/0.3.6/package/index.js:381:18)
at RedisReplyParser.emit (events:27:15)
Should I install somehow differently?
from node-redis.
You are still running the older version for whatever reason.
Please do an "npm update" and you should get v0.3.7, which has two fixes I just did today.
from node-redis.
Yep, with your second comment (where you said you pushed 0.3.7) it seems the issue is gone for now. Maybe npm needed the version to change?
Thanks for the quick fix :)
from node-redis.
Glad to hear it.
from node-redis.
Related Issues (20)
- 3 socket writes instead of one?
- Cannot read properties of undefined (reading 'replicas') [calling "get"] HOT 1
- Add support for HSCAN [NOVALUES]
- Add command filter for CLIENT KILL to support maximum age via [MAXAGE] option
- Support XREAD, XREADGROUP reading from last message of stream
- Supporting unstable commands
- Does cluster mode support pipeline?
- Unable to use +/- inf at method: zAdd HOT 2
- Create "ensure" method
- quit vs disconnect - flipped behaviour or wrong documentation HOT 1
- isolationPoolOptions have terrible defaults
- createCluster clients don't handle on('error') correctly HOT 2
- "ClientClosedError: The client is closed" error in my TypeScript application redis usage
- Quit is not getting closed HOT 1
- Detect pub sub subscription status/connection on the cluster client?
- FT.AGGREGATE _ LOAD * is not supported
- Is there a read from option in redis-cluster? HOT 2
- Successfully connected to Redis server, but did not trigger connect, ready event callback HOT 1
- sRandMember seems to not support the count argument HOT 2
- Unable to connect to literal IPv6 addresses via the `url` option
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 node-redis.