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

Http Response End -- RangeError: Maximum call stack size exceeded #1169

Closed
ssingaraveluTrmb opened this issue Dec 10, 2020 · 7 comments
Closed
Labels
bug Something isn't working community integrations
Milestone

Comments

@ssingaraveluTrmb
Copy link

Describe the bug
Getting the below exception on dd-trace v0.28.0 and above (possibly due to this change (#1127)). This makes the request timeout without returning a response. Should be reproducible on the below mentioned env setup.

(node:60192) UnhandledPromiseRejectionWarning: RangeError: Maximum call stack size exceeded
    at module.exports.internals.Response.end (/Users/ssingaravelu/Projects/cf-users/node_modules/@hapi/shot/lib/response.js:81:15)
    at module.exports.internals.Response.res._datadog_end (/Users/ssingaravelu/Projects/cf-users/node_modules/dd-trace/packages/dd-trace/src/plugins/util/web.js:265:29)
    at module.exports.internals.Response.end (/Users/ssingaravelu/Projects/cf-users/node_modules/@hapi/shot/lib/response.js:81:15)
    at module.exports.internals.Response.res._datadog_end (/Users/ssingaravelu/Projects/cf-users/node_modules/dd-trace/packages/dd-trace/src/plugins/util/web.js:265:29)
    at module.exports.internals.Response.end (/Users/ssingaravelu/Projects/cf-users/node_modules/@hapi/shot/lib/response.js:81:15)
    at module.exports.internals.Response.res._datadog_end (/Users/ssingaravelu/Projects/cf-users/node_modules/dd-trace/packages/dd-trace/src/plugins/util/web.js:265:29)
    at module.exports.internals.Response.end (/Users/ssingaravelu/Projects/cf-users/node_modules/@hapi/shot/lib/response.js:81:15)
    at module.exports.internals.Response.res._datadog_end (/Users/ssingaravelu/Projects/cf-users/node_modules/dd-trace/packages/dd-trace/src/plugins/util/web.js:265:29)
    at module.exports.internals.Response.end (/Users/ssingaravelu/Projects/cf-users/node_modules/@hapi/shot/lib/response.js:81:15)
    at module.exports.internals.Response.res._datadog_end (/Users/ssingaravelu/Projects/cf-users/node_modules/dd-trace/packages/dd-trace/src/plugins/util/web.js:265:29)
    at module.exports.internals.Response.end (/Users/ssingaravelu/Projects/cf-users/node_modules/@hapi/shot/lib/response.js:81:15)
    at module.exports.internals.Response.res._datadog_end (/Users/ssingaravelu/Projects/cf-users/node_modules/dd-trace/packages/dd-trace/src/plugins/util/web.js:265:29)
    at module.exports.internals.Response.end (/Users/ssingaravelu/Projects/cf-users/node_modules/@hapi/shot/lib/response.js:81:15)
    at module.exports.internals.Response.res._datadog_end (/Users/ssingaravelu/Projects/cf-users/node_modules/dd-trace/packages/dd-trace/src/plugins/util/web.js:265:29)
    at module.exports.internals.Response.end (/Users/ssingaravelu/Projects/cf-users/node_modules/@hapi/shot/lib/response.js:81:15)
    at module.exports.internals.Response.res._datadog_end (/Users/ssingaravelu/Projects/cf-users/node_modules/dd-trace/packages/dd-trace/src/plugins/util/web.js:265:29)
(Use `node --trace-warnings ...` to show where the warning was created)
(node:60192) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:60192) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Environment

  • Operation system: --> Linux (reproducible locally in MacOS as well)
  • Node version: --> 14.5.x
  • Hapi version: --> 20.0.3
  • Tracer version: --> 0.28.0
  • Agent version: --> 6.13.0
@ssingaraveluTrmb ssingaraveluTrmb added the bug Something isn't working label Dec 10, 2020
@rochdev
Copy link
Member

rochdev commented Dec 10, 2020

Can you provide a replication snippet? I tried replicating this with the example from the shot documentation but it's working properly.

@rochdev
Copy link
Member

rochdev commented Jan 6, 2021

Since I wasn't able to replicate and it's been a while, we simply went ahead and reverted the aforementioned PR.

@ssingaraveluTrmb Can you try 0.30.0-beta.0 and let me know if it fixes the issue?

@jasonvangundy
Copy link

We are having the exact same issue. I pinpointed it down to our use of: https://github.com/travi/hapi-react-router and seemingly our use of server side rendering. HTML requests manifest the above issue, but our calls for json succeed just fine. If I hear anything back externally I'll report here.

@rochdev
Copy link
Member

rochdev commented Jan 7, 2021

@jasonvangundy Can you try the beta version from above?

@jasonvangundy
Copy link

this seems to have fixed it for us! thank you!

@rochdev rochdev added this to the 0.30.0 milestone Jan 8, 2021
@rochdev
Copy link
Member

rochdev commented Jan 8, 2021

Thanks for confirming!

@ssingaraveluTrmb I'm closing the issue since we have multiple confirmations that this resolved the issue at this point. Please feel free to re-open if you're still having issues. The fix will be in the next release later today.

@rochdev rochdev closed this as completed Jan 8, 2021
@ssingaraveluTrmb
Copy link
Author

That fixed the issue for us too! Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working community integrations
Projects
None yet
Development

No branches or pull requests

3 participants