redis / hiredis-node

Node wrapper for hiredis
BSD 3-Clause "New" or "Revised" License
305 stars 84 forks source link

Assertion `redisReaderFeed(r->reader, data, length) == 0' failed. #115

Closed sharathm closed 8 years ago

sharathm commented 8 years ago

Hi All,

We are currently using node-redis to connect to a ElastiCache instance. Everything runs fine for a while.. but, we see the following error in our nodejs application..

nodejs: ../src/reader.cc:191: static Nan::NAN_METHOD_RETURN_TYPE
hiredis::Reader::Feed(Nan::NAN_METHOD_ARGS_TYPE): 
Assertion `redisReaderFeed(r->reader, data, length) == 0' failed.

After this, our application crashes and needs to be restarted.

At first we thought it might be a availability issue since we were running a single instance inside a cluster. Then we thought it might be memory issue and so we upgraded our EC2 instances.

We do experience some peak in our load but that is ~4000 keys being written to ElastiCache. ElastiCache does not show any signs of down time.

Can anyone shed some light as to what could be going on here?

We are running..

node 4.3.1 node-redis 2.4.2 node-hiredis 0.4.1

badboy commented 8 years ago

The exact line and a comment is:

/* Can't handle OOM for now. */
assert(redisReaderFeed(r->reader, data, length) == REDIS_OK);

So maybe you're running out ouf memory?

sharathm commented 8 years ago

I am running two EC2 instances.. One t2.micro (1GB Mem, 2GB Swap) and one t2.small (2GB Mem, 8GB Swap). On both of them my application crashes... and for such low number of keys?

Is there any recommendation for what kind of hardware is best suited for the load I have given above?

badboy commented 8 years ago

There's not much I can do here. Closing for now. If this reappears feel free to open again, hopefully with more information or a way to reproduce.