Request aborted on expressjs

匿名 (未验证) 提交于 2019-12-03 01:05:01

问题:

I am using expressjs and multer to handle upload of files on my nodejs server. I am often getting this error in production logs :

Error: Request aborted at onaborted (/home/drp/server/node_modules/express/lib/response.js:951:15) at Array.onfinish [as 0] (/home/drp/server/node_modules/express/lib/response.js:987:50) at listener (/home/drp/server/node_modules/express/node_modules/on-finished/index.js:164:15) at onFinish (/home/drp/server/node_modules/express/node_modules/on-finished/index.js:95:5) at callback (/home/drp/server/node_modules/express/node_modules/on-finished/node_modules/ee-first/index.js:33:10) at Socket.onevent (/home/drp/server/node_modules/express/node_modules/on-finished/node_modules/ee-first/index.js:66:5) at Socket.emit (events.js:117:20) at net.js:440:14 at process._tickCallback (node.js:419:13) 

What does it really mean ? How can I trace it and debug it ?

回答1:

If you use nginx on top of this. Try restart it.

Or any load balancer, sometimes those sends across incorrect request 200 (or 304 or different requests) doing ExpressJS answering with this fail and producing the Error: Request aborted.



标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!