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 #914

Closed
kaue opened this issue Aug 24, 2016 · 9 comments
Closed

RangeError: Maximum call stack size exceeded #914

kaue opened this issue Aug 24, 2016 · 9 comments

Comments

@kaue
Copy link

kaue commented Aug 24, 2016

Node: v6.3.0
winston: ^2.2.0
winston-mongodb: ^1.6.0

Stack:
RangeError: Maximum call stack size exceeded at Object.exports.clone (/workspace/node_modules/winston/lib/winston/common.js:79:26) at Object.exports.clone (/workspace/node_modules/winston/lib/winston/common.js:110:52) at Object.exports.clone (/workspace/node_modules/winston/lib/winston/common.js:110:52) at Object.exports.clone (/workspace/node_modules/winston/lib/winston/common.js:110:52) at Object.exports.clone (/workspace/node_modules/winston/lib/winston/common.js:110:52) at Object.exports.clone (/workspace/node_modules/winston/lib/winston/common.js:110:52) at Object.exports.clone (/workspace/node_modules/winston/lib/winston/common.js:110:52) at Object.exports.clone (/workspace/node_modules/winston/lib/winston/common.js:110:52) at Object.exports.clone (/workspace/node_modules/winston/lib/winston/common.js:110:52) at Object.exports.clone (/workspace/node_modules/winston/lib/winston/common.js:110:52) at Object.exports.clone (/workspace/node_modules/winston/lib/winston/common.js:110:52) at Object.exports.clone (/workspace/node_modules/winston/lib/winston/common.js:110:52) at Object.exports.clone (/workspace/node_modules/winston/lib/winston/common.js:110:52) at Object.exports.clone (/workspace/node_modules/winston/lib/winston/common.js:110:52) at Object.exports.clone (/workspace/node_modules/winston/lib/winston/common.js:110:52) at Object.exports.clone (/workspace/node_modules/winston/lib/winston/common.js:110:52)

@shahimclt
Copy link

shahimclt commented Aug 27, 2016

I had encountered this error in my project. It turned out passing some specific kinds of objects causes winston to print very huge logs causing some kind of overflow. In my case it was caused by printing mongodb query results.
See this SO question and check if your issue is similar.

P.S: Any contributors viewing this, please check out that SO question (I am the OP) and try to provide any input if you can.

@kaue
Copy link
Author

kaue commented Aug 27, 2016

I think this time the problem is that i was printing a function as metadata.

@thinkkevin
Copy link

check #862

@mdnorman
Copy link

mdnorman commented Nov 19, 2016

I have also run into this problem when logging the error object coming from the soap library. This is because the error contains the original request object, and request objects for some reason have circular references. I only see it with the logstash output because it uses the clone function to copy the metadata value into the logstash @fields.

Example line of code:
logger.error('Some error info:', err)

@mdnorman
Copy link

Updated #474

@shahimclt
Copy link

Any Updates?

I have been constantly checking #862, #474 and #914 for an update. I also have a question posted here which too hasn't gotten any response.

@jifeon
Copy link
Contributor

jifeon commented Jan 31, 2017

The fix in #977

@vbardales
Copy link

👍

@fega
Copy link

fega commented Sep 20, 2017

I'm still getting the same problem when a custom formater is used

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

7 participants