Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Partial response of 16KB with redis cache. #24

Open
ankiit opened this issue May 25, 2017 · 4 comments
Open

Partial response of 16KB with redis cache. #24

ankiit opened this issue May 25, 2017 · 4 comments

Comments

@ankiit
Copy link

ankiit commented May 25, 2017

I've started facing following error for api response size > 16KB when using redis as a cache. And it ends up returning partial data of 16KB.
with following log.
Error: stream.push() after EOF at readableAddChunk (_stream_readable.js:156:17) at RedisRStream.Readable.push (_stream_readable.js:134:10)

@ikappas
Copy link

ikappas commented Jan 25, 2018

@ankiit Have you found any workaround for this issue?

@ankiit
Copy link
Author

ankiit commented Jan 27, 2018

I'm using the older version of redis-stream.

@ikappas
Copy link

ikappas commented Feb 7, 2018

@ankiit I seem to have solved my issue.

When calling redis.createClient I had to add the detect_buffers: true option.

According to the redis-rstream readme under usage:

...Be sure to enable an option in your redis client to return Buffers for the data, like detect_buffers: true so that binary data will be read properly...

@busheezy
Copy link

busheezy commented Nov 29, 2018

This worked for me until I tried to use a transform. I was only getting 16kb back from redis, I enabled detect_buffers and I get the full response back. Now when I try to use the tranform, the chunk is only 16kb.

edit: I figured it out. I looked at the markdown example a bit closer and noticed they were using object mode and realized I needed to add the chunks together.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants