在尝试代理后端api时,我们的快递有时会因错误HPE_INVALID_CHUNK_SIZE而崩溃。
不知道是什么原因引起的,但是我的假设是后端Apache服务器没有及时响应。
我不明白为什么应用程序崩溃,因为express应该内置错误处理来解决这个问题,即使这样它也不会崩溃。
如果崩溃了,还有办法从服务器重新启动react应用,而不是完全退出吗?
有人知道我们为什么会得到HPE_INVALID_CHUNK_SIZE以及如何处理吗?
非常感谢。
错误日志:
[HPM] Error occurred while trying to proxy request /rovr-`enter code here`app/services/admin/vehicleshiftrules?deliverystartpointid=721158e2-d289-4537-9c46-13e6e20fa668&_=1550266582837 from rovr-portal-prod.walmart.com to http://asda.rovr-api.prod.walmart.com (HPE_INVALID_CHUNK_SIZE) (https://nodejs.org/api/errors.html#errors_common_system_errors)
events.js:141
throw er; // Unhandled 'error' event
^
Error: write after end
at ServerResponse.OutgoingMessage.write (_http_outgoing.js:430:15)
at IncomingMessage.ondata (_stream_readable.js:528:20)
at emitOne (events.js:77:13)
at IncomingMessage.emit (events.js:169:7)
at IncomingMessage.Readable.read (_stream_readable.js:360:10)
at flow (_stream_readable.js:743:26)
at ServerResponse.<anonymous> (_stream_readable.js:601:7)
at emitNone (events.js:67:13)
at ServerResponse.emit (events.js:166:7)
at Socket.ondrain (_http_common.js:193:44)
at emitNone (events.js:72:20)
at Socket.emit (events.js:166:7)
at onwriteDrain (_stream_writable.js:356:12)
at afterWrite (_stream_writable.js:344:5)
at onwrite (_stream_writable.js:337:7)
at Socket.WritableState.onwrite (_stream_writable.js:89:5)
npm ERR! Linux 2.6.32-696.6.3.el6.x86_64
npm ERR! argv "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/bin/npm-cli.js" "run" "open:prod"
npm ERR! node v4.3.0
npm ERR! npm v2.14.12
npm ERR! code ELIFECYCLE
npm ERR! rovr-portal@0.226.0 open:prod: `babel-node tools/prodServer.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the rovr-portal@0.226.0 open:prod script 'babel-node tools/prodServer.js'.
npm ERR! This is most likely a problem with the rovr-portal package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! babel-node tools/prodServer.js
npm ERR! You can get their info via:
npm ERR! npm owner ls rovr-portal
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /app/rovr-portal/npm-debug.log
ERROR: "open:prod" exited with 1.
npm ERR! Linux 2.6.32-696.6.3.el6.x86_64
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "prod"
npm ERR! node v4.3.0
npm ERR! npm v2.14.12
npm ERR! code ELIFECYCLE
npm ERR! rovr-portal@0.226.0 prod: `npm-run-all --parallel open:prod`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the rovr-portal@0.226.0 prod script 'npm-run-all --parallel open:prod'.
npm ERR! This is most likely a problem with the rovr-portal package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! npm-run-all --parallel open:prod
npm ERR! You can get their info via:
npm ERR! npm owner ls rovr-portal
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /app/rovr-portal/npm-debug.log