为什么RangeError:在nodejs服务器重启后超出了最大调用堆栈大小?

时间:2017-02-21 08:53:58

标签: javascript node.js express

我遇到了RangeError的一个主要问题:超过上个月的最大调用堆栈大小。

如果我重新启动节点服务器,则会删除此错误,并在一天或两天后出现此错误。

  

错误

RangeError: Maximum call stack size exceeded<br> &nbsp; &nbsp;at disabled (/home/myapp/public_html
/node/node_modules/express/node_modules/debug/debug.js:65:20)<br> &nbsp; &nbsp;at trim_prefix (/home
/myapp/public_html/node/node_modules/express/lib/router/index.js:307:5)<br> &nbsp; &nbsp;at /home
/myapp/public_html/node/node_modules/express/lib/router/index.js:280:7<br> &nbsp; &nbsp;at Function
.process_params (/home/myapp/public_html/node/node_modules/express/lib/router/index.js:330:12)<br
> &nbsp; &nbsp;at next (/home/myapp/public_html/node/node_modules/express/lib/router/index.js:271
:10)<br> &nbsp; &nbsp;at Layer.handle_error (/home/myapp/public_html/node/node_modules/express/lib
/router/layer.js:67:12)<br> &nbsp; &nbsp;at trim_prefix (/home/myapp/public_html/node/node_modules
/express/lib/router/index.js:310:13)<br> &nbsp; &nbsp;at /home/myapp/public_html/node/node_modules
/express/lib/router/index.js:280:7<br> &nbsp; &nbsp;at Function.process_params (/home/myapp/public_html
/node/node_modules/express/lib/router/index.js:330:12)<br> &nbsp; &nbsp;at next (/home/myapp/public_html
/node/node_modules/express/lib/router/index.js:271:10)<br> &nbsp; &nbsp;at Layer.handle_error (/home
/myapp/public_html/node/node_modules/express/lib/router/layer.js:67:12)<br> &nbsp; &nbsp;at trim_prefix
 (/home/myapp/public_html/node/node_modules/express/lib/router/index.js:310:13)<br> &nbsp; &nbsp;at
 /home/myapp/public_html/node/node_modules/express/lib/router/index.js:280:7<br> &nbsp; &nbsp;at Function
.process_params (/home/myapp/public_html/node/node_modules/express/lib/router/index.js:330:12)<br
> &nbsp; &nbsp;at next (/home/myapp/public_html/node/node_modules/express/lib/router/index.js:271
:10)<br> &nbsp; &nbsp;at Layer.handle_error (/home/myapp/public_html/node/node_modules/express/lib
/router/layer.js:67:12)
  

依赖

"nodejs"   => "version": "v6.2.2",
"express"  => "version": "4.13.4",
"mongoose" => "version": "4.4.4",
"mongodb"  => "version": "2.4.9"

我发现这个错误来自expressjs中间件。

可以帮我解决这个错误吗?

0 个答案:

没有答案