I found our Node services intercommunication (using request) will occationally report this error:
Error: Parse Error
at socketOnEnd (_http_server.js:455:20)
at Socket.emit (events.js:203:15)
at Socket.EventEmitter.emit (domain.js:448:20)
at endReadableNT (_stream_readable.js:1129:12)
at process._tickCallback (internal/process/next_tick.js:63:19)
After some digging in _http_server.js, it turns out to be the http parser finish error. It means that util the socket close, the http parser cant correctly parse the http request.
Our service log shows that its the client timeout and close the socket and then the server report this error. So I doubt that it's this request issue cause the problem, but I have no further evidence.
Another question is why the Node server receiving a bad http request not aborting the parse phase and response with an error immediately but hanging there until the client timeout and close the socket?
Is anyone reaching the same problem?
p.s.
Using Node version: 10.16.0