You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've been trying to reproduce the issue with no luck. Can try to post a self contained test that reproduces the issue, or provide more specific instructions on how to reproduce it. Thanks
Perfectly accurate but unhelpful advice from another thread about ECONNRESET:
ECONNRESET means the peer closed the connection (i.e., a fact of life you simply need to deal with) and should be handled by adding 'error' event listeners in the right places.
The real issue here isn't the ECONNRESET. It's the fact that the error object does not contains enough information to identify the "right places" to add the needed listeners.
For example, this is the entire call stack for the one that periodically restarts my service:
Error: read ECONNRESET
at TLSWrap.onStreamRead (node:internal/stream_base_commons:217:20)
at TLSWrap.callbackTrampoline (node:internal/async_hooks:130:17)
I suspect that those worthless call stacks are not a nodejs problem, but rather a Javascript runtime problem. But whether or not that's the case, could nodejs do anything to make these call stacks useful?
For example, provide default error listeners that just log information about which listener caught the error before terminating the process. That would give us enough information to actually use the advice that I quoted above.
Version
Node.js v18.8.0
Platform
Linux 5.4.0-1089-azure #94~18.04.1-Ubuntu SMP Fri Aug 5 12:34:50 UTC 2022 x86_64 Linux
Subsystem
http2
What steps will reproduce the bug?
Initialize an http2 server like so
Create a client connection and terminate it abruptly
This will crash the server with the following error:
How often does it reproduce? Is there a required condition?
Whenever a client connection is abruptly closed
What is the expected behavior?
I expect the error should be caught in one of the error catching blocks:
either:
or:
What do you see instead?
Node crashes with the error:
Additional information
No response
The text was updated successfully, but these errors were encountered: