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

Emit timeout error if socket connection dies silently #142

Open
clue opened this issue Apr 28, 2023 · 3 comments
Open

Emit timeout error if socket connection dies silently #142

clue opened this issue Apr 28, 2023 · 3 comments

Comments

@clue
Copy link
Owner

clue commented Apr 28, 2023

This project already supports detecting closed connections when receiving a close event. On top of this, to account for situations where the socket connection may die silently (e.g. due to power outage or network failure), we should also consider a connection dead if we don't receive any response to an outstanding request within a timeout period (default could be 600s?).

It's important to note that Redis employs request/response semantics, and the server is expected to send response messages in a timely manner. That being said, requests such as BLPOP with larger timeout values can take significantly longer.

Out of scope: Redis also allows sending regular heartbeat/ping messages to keep the connection alive if there is no activity for a certain time, but we employ an idle connection time for this case anyway (see #130 / #118).

Refs clue/reactphp-eventsource#37, #132 and others

We welcome contributions, reach out if you want to support this project or become a sponsor ❤️

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

No branches or pull requests

3 participants