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

Invalid string length #88

Open
thorupio opened this issue Nov 5, 2021 · 1 comment
Open

Invalid string length #88

thorupio opened this issue Nov 5, 2021 · 1 comment

Comments

@thorupio
Copy link

thorupio commented Nov 5, 2021

I'm trying to cache an array and I get this error:

RangeError: Invalid string length at JSON.stringify (<anonymous>) at /app/node_modules/cache-manager-redis/index.js:241:24

I'm unable to catch this error in my code for some reason and it messes with my Heroku dyno to have this being flagged as an unhandled promise rejection.

Is there a maximum array size, I should be careful not to exceed?

@mrister
Copy link
Contributor

mrister commented Nov 5, 2021

You are probably dealing with a big Object, consider making it smaller if possible, Also there might be some nice clues here, https://stackoverflow.com/questions/29175877/json-stringify-throws-rangeerror-invalid-string-length-for-huge-objects

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

2 participants