Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unhandled error event: Error: read EFAULT #1289

Closed
drobnikj opened this issue Feb 12, 2021 · 1 comment · Fixed by #1299
Closed

Unhandled error event: Error: read EFAULT #1289

drobnikj opened this issue Feb 12, 2021 · 1 comment · Fixed by #1299

Comments

@drobnikj
Copy link

There is unhandled error comes from ioresdis package

[ioredis] Unhandled error event: Error: read EFAULT
    at TCP.onStreamRead (internal/stream_base_commons.js:209:20)
    at TCP.callbackTrampoline (internal/async_hooks.js:126:14)

It happens regularly in some specific edge cases, in our production environment. We try to fix the source of the issue, but the package should handle this error somehow to pretend to end up unhandled.

It looks like the PR #1236 should solve it.

luin added a commit that referenced this issue Mar 10, 2021
Currently, a stream (ex `net.Socket`) is returned via a Promise, and error
handlers are attached to the stream in the Promise callback.

However, if the errors are thrown immediately (ex with `process.nextTick()`),
the error handlers will not have the chance to attach to the stream, thus
unhandled error events will be thrown.

This PR makes all connectors resolve a factory instead of the created stream,
so the event handlers can be attached in the same tick.

Closes #1236
Closes #1209
Closes #1289
@ioredis-robot
Copy link
Collaborator

🎉 This issue has been resolved in version 4.24.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants