newrelic / node-newrelic

New Relic Node.js agent code base. Developers are welcome to create pull requests here, please see our contributing guidelines. For New Relic technical support, please go to http://support.newrelic.com.
Apache License 2.0
969 stars 398 forks source link

Mongoose track error #161

Closed jacklc closed 10 years ago

jacklc commented 10 years ago

My app on heroku is always changing the state do APP Crashed. The require of newrelic is the first line of web server file. When i remove de include the crash stop. See stack trace below:

2014-07-02T20:13:37.800750+00:00 heroku[router]: at=error code=H13 desc="Connection closed without response" method=GET path="/get-bairros/9183" host=cloud-cep.herokuapp.com request_id=d36167f7-ee9b-4367-9268-286e35007da1 fwd="177.139.139.133" dyno=web.1 connect=3 service=244 status=503 bytes=408 2014-07-02T20:13:37.553119+00:00 app[web.1]: {"name":"newrelic","hostname":"19c911f2-775e-41ec-87ec-f5e0f8e473cb","pid":2,"component":"mongodb","level":10,"msg":"Tracing MongoDB bairros.find({\"localidade.localidadeID\":9183}).","time":"2014-07-02T20:13:37.553Z","v":0} 2014-07-02T20:13:37.778033+00:00 app[web.1]: {"name":"newrelic","hostname":"19c911f2-775e-41ec-87ec-f5e0f8e473cb","pid":2,"component":"mongodb","level":10,"msg":"MongoDB query trace segment ended for bairros: nothing to pull.","time":"2014-07-02T20:13:37.777Z","v":0} 2014-07-02T20:13:37.783484+00:00 app[web.1]: {"name":"newrelic","hostname":"19c911f2-775e-41ec-87ec-f5e0f8e473cb","pid":2,"component":"error_tracer","level":20,"error":[0,"WebTransaction/Expressjs/GET//get-bairros/:cidadeid","Unexpected token R","SyntaxError",{"userAttributes":{},"agentAttributes":{},"intrinsics":{},"request_uri":"/get-bairros/9183","stack_trace":["SyntaxError: Unexpected token R"," at Object.parse (native)"," at Promise. (/app/web_server.js:98:44)"," at Promise.addBack (/app/node_modules/mongoose/lib/promise.js:128:8)"," at Promise.EventEmitter.emit (events.js:96:17)"," at Promise.emit (/app/node_modules/mongoose/lib/promise.js:66:38)"," at Promise.complete (/app/node_modules/mongoose/lib/promise.js:77:20)"," at Query.execFind (/app/node_modules/mongoose/lib/query.js:1542:28)"," at model.Document.init (/app/node_modules/mongoose/lib/document.js:229:11)"," at model.init (/app/node_modules/mongoose/lib/model.js:196:36)"," at cb (/app/node_modules/mongoose/lib/query.js:1540:14)"]}],"msg":"Error to be sent to collector:","time":"2014-07-02T20:13:37.783Z","v":0} 2014-07-02T20:13:37.795806+00:00 heroku[router]: at=error code=H13 desc="Connection closed without response" method=GET path="/get-cidades/SP" host=cloud-cep.herokuapp.com request_id=85ec8b17-b2c2-4ac3-aec2-86bb7e7fa0ef fwd="177.139.139.133" dyno=web.1 connect=2 service=269 status=503 bytes=406 2014-07-02T20:13:37.782736+00:00 app[web.1]: {"name":"newrelic","hostname":"19c911f2-775e-41ec-87ec-f5e0f8e473cb","pid":2,"component":"error_tracer","level":10,"err":{"message":"Unexpected token R","name":"SyntaxError","stack":"SyntaxError: Unexpected token R\n at Object.parse (native)\n at Promise. (/app/web_server.js:98:44)\n at Promise.addBack (/app/node_modules/mongoose/lib/promise.js:128:8)\n at Promise.EventEmitter.emit (events.js:96:17)\n at Promise.emit (/app/node_modules/mongoose/lib/promise.js:66:38)\n at Promise.complete (/app/node_modules/mongoose/lib/promise.js:77:20)\n at Query.execFind (/app/node_modules/mongoose/lib/query.js:1542:28)\n at model.Document.init (/app/node_modules/mongoose/lib/document.js:229:11)\n at model.init (/app/node_modules/mongoose/lib/model.js:196:36)\n at cb (/app/node_modules/mongoose/lib/query.js:1540:14)"},"msg":"Got exception to trace:","time":"2014-07-02T20:13:37.782Z","v":0} 2014-07-02T20:13:37.783601+00:00 app[web.1]: 2014-07-02T20:13:37.783729+00:00 app[web.1]: /app/node_modules/newrelic/node_modules/continuation-local-storage/node_modules/async-listener/glue.js:319 2014-07-02T20:13:37.783991+00:00 app[web.1]: throw er; 2014-07-02T20:13:37.784236+00:00 app[web.1]: ^ 2014-07-02T20:13:37.784278+00:00 app[web.1]: SyntaxError: Unexpected token R 2014-07-02T20:13:37.784280+00:00 app[web.1]: at Object.parse (native) 2014-07-02T20:13:37.784282+00:00 app[web.1]: at Promise. (/app/web_server.js:98:44) 2014-07-02T20:13:37.784284+00:00 app[web.1]: at Promise.addBack (/app/node_modules/mongoose/lib/promise.js:128:8) 2014-07-02T20:13:37.784285+00:00 app[web.1]: at Promise.EventEmitter.emit (events.js:96:17) 2014-07-02T20:13:37.784287+00:00 app[web.1]: at Promise.emit (/app/node_modules/mongoose/lib/promise.js:66:38) 2014-07-02T20:13:37.784288+00:00 app[web.1]: at Promise.complete (/app/node_modules/mongoose/lib/promise.js:77:20) 2014-07-02T20:13:37.784290+00:00 app[web.1]: at Query.execFind (/app/node_modules/mongoose/lib/query.js:1542:28) 2014-07-02T20:13:37.784291+00:00 app[web.1]: at model.Document.init (/app/node_modules/mongoose/lib/document.js:229:11) 2014-07-02T20:13:37.784293+00:00 app[web.1]: at model.init (/app/node_modules/mongoose/lib/model.js:196:36) 2014-07-02T20:13:37.784295+00:00 app[web.1]: at cb (/app/node_modules/mongoose/lib/query.js:1540:14) 2014-07-02T20:13:38.989215+00:00 heroku[web.1]: State changed from up to crashed 2014-07-02T20:13:40.692298+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/get-cep-all/02345040" host=cloud-cep.herokuapp.com request_id=7518b8b6-8d48-4af7-a0b4-fd0038b75c3b fwd="177.139.139.133" dyno=web.1 connect=101 service= status=503 bytes=

txase commented 10 years ago

Hi @jacklc,

We are transitioning away from using the GitHub issue tracker for support of the Node.js Agent. Instead, please go to http://support.newrelic.com. You will have a better experience through our support portal than we have been able to provide here on GitHub.

We appreciate your understanding as we undergo this transition.