本文介绍了请求在expressjs上中止的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在使用expressjs和multer处理我的nodejs服务器上的文件上传.我经常在生产日志中遇到此错误:
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 ?
推荐答案
如果在此之上使用nginx
.尝试重新启动它.
If you use nginx
on top of this. Try restart it.
或任何负载均衡器,有时那些负载均衡器会发送不正确的请求200(或304或其他请求),从而使ExpressJS失败并产生Error: Request aborted
.
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
.
这篇关于请求在expressjs上中止的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!