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

RangeError: Maximum call stack size exceeded #20

Open
iamnewspecies opened this issue Feb 20, 2019 · 5 comments
Open

RangeError: Maximum call stack size exceeded #20

iamnewspecies opened this issue Feb 20, 2019 · 5 comments

Comments

@iamnewspecies
Copy link

iamnewspecies commented Feb 20, 2019

We are using Sequeilze which internally uses bluebird. To fix the logging so that it has session id which connects all our logs in one request we added cls-bluebird. But now we are seeing that we are getting "RangeError: Maximum call stack size exceeded" after our application runs for few hours.

What may cause this and is this a know issue?

@overlookmotel
Copy link
Collaborator

overlookmotel commented Feb 20, 2019

Hi @iamnewspecies.

This is not a known issue. Have you confirmed that this error is due to cls-bluebird? It seems more likely to me that it's not, or that you/Sequelize are using cls-bluebird incorrectly and not exiting contexts after each request. I guess that could result in every request being stacked on top of the last.

Please come back to me when you've investigated further.

@DavidMorton
Copy link

I just had this same error in production on several servers....

@DavidMorton
Copy link

bluebird/lib/shimOnCancel.js:41:40)
at Promise. (/spotv2/spot2/api/node_modules/cls-bluebird/lib/shimOnCancel.js:41:40)
at Promise. (/spotv2/spot2/api/node_modules/cls-bluebird/lib/shimOnCancel.js:41:40)
at Promise. (/spotv2/spot2/api/node_modules/cls-bluebird/lib/shimOnCancel.js:41:40)
at Promise. (/spotv2/spot2/api/node_modules/cls-bluebird/lib/shimOnCancel.js:41:40)
at Promise. (/spotv2/spot2/api/node_modules/cls-bluebird/lib/shimOnCancel.js:41:40)
at Promise. (/spotv2/spot2/api/node_modules/cls-bluebird/lib/shimOnCancel.js:41:40)
at Promise. (/spotv2/spot2/api/node_modules/cls-bluebird/lib/shimOnCancel.js:41:40)
at Promise. (/spotv2/spot2/api/node_modules/cls-bluebird/lib/shimOnCancel.js:41:40)
at Promise. (/spotv2/spot2/api/node_modules/cls-bluebird/lib/shimOnCancel.js:41:40)
at Promise. (/spotv2/spot2/api/node_modules/cls-bluebird/lib/shimOnCancel.js:41:40)
at Promise. (/spotv2/spot2/api/node_modules/cls-bluebird/lib/shimOnCancel.js:41:40)

@overlookmotel
Copy link
Collaborator

My apologies. This does sound like it could be an bug in cls-bluebird.

@DavidMorton Can you please share some more details?

  • Are you using promise cancellation?
  • What version of Node are you running?
  • Latest version of cls-bluebird?
  • What version of bluebird are you using?
  • Any other code you can share

I'll try to get to the bottom of this if I possibly can.

@charlie-s
Copy link

We're getting this suddenly in production as well. Ex:

Unhandled rejection RangeError: Maximum call stack size exceeded
    at executorPatched (/app/node_modules/cls-bluebird/lib/shimOnCancel.js:1:1)
    at executorPatched (/app/node_modules/cls-bluebird/lib/shimOnCancel.js:37:21)
    at executorPatched (/app/node_modules/cls-bluebird/lib/shimOnCancel.js:37:21)
    at executorPatched (/app/node_modules/cls-bluebird/lib/shimOnCancel.js:37:21)
    ...
  • Node v10.15.2
  • Sequelize v5.21.3
  • bluebird v3.5.5
  • cls-bluebird v2.1.0

We're not using bluebird/cls-bluebird directly at all, but it's a dependency of Sequelize so somewhere under the hood they're using. We're trying to find a way to replicate outside of "let it run in production for about 2 hours...", once I can get more info I'll post here, it may help others.

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

4 participants