Skip to content

Problematic socket.parser.resume() error #3508

@binarybehemoth

Description

@binarybehemoth

This bug has been crashing my node.js server for the past one week. On average it seems to occur every 12 hours. Normally when an error occurs in node.js, node.js will tell you the line number and your source file that lead to the error. However, this error is so weird that it does not let me know where the error originates from in my source codes. I can't even find _http_server.js within the entire project and node modules. As such, I have been unable to pinpoint and eliminate the bug.

Without the stack trace module 'longjohn', I would get the following error message:
socket.parser.resume()
cannot read property resume of null (_http_server.js:442)
......

After I installed 'longjohn', I obtained the following error message:

TypeError: Cannot read property 'resume' of null
at socketOnDrain (_http_server.js:442:20)
at ServerResponse.updateOutgoingData as _onPendingData
at ServerResponse.OutgoingMessage._send (_http_outgoing.js:128:14)
at ServerResponse.OutgoingMessage.write (_http_outgoing.js:470:16)
at ReadStream.ondata (_stream_readable.js:525:20)
at emitOne (events.js:77:13)
at ReadStream.emit (events.js:169:7)
at readableAddChunk (_stream_readable.js:146:16)
at ReadStream.Readable.push (_stream_readable.js:110:10)
at onread (fs.js:1744:12)
at FSReqWrap.wrapper as oncomplete
at ReadStream.Readable.on (_stream_readable.js:655:33)
at ReadStream.Readable.pipe (_stream_readable.js:522:7)
at SendStream.stream (C:\XXXX\node_modules\express\node_modules\send\lib\send.js:533:10)
at SendStream.send (C:\XXXX\node_modules\express\node_modules\send\lib\send.js:480:8)
at C:\XXXX\node_modules\express\node_modules\send\lib\send.js:392:10
at FSReqWrap.oncomplete (fs.js:82:15)
worker 1760 died

The problem only occurs on my production server (ovh, Windows Hyper-V, node v4.2.1) and not on my local development computer (Windows 10, node v4.2.0).

It is worthwhile mentioning that I am using socket.io. I am also using an external service called Global Counter that displays the number of online users. I am running setInterval() in one of the workers to remove expired records.

Could someone tell me the meaning of these error messages, how the error occurs, and how I should solve it?

Metadata

Metadata

Assignees

No one assigned

    Labels

    httpIssues or PRs related to the http subsystem.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions