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 noticed that when executing a BLPOP and the Redis-Server "goes away" without closing the socket (very rare occasions, especially on production) the promise never returns making the whole connection unusable. If the server closes the connection, all is fine.
I know the library has by design no special handling for any Redis command but maybe in this case internally adding React\Promise\Timer\timeout would make sense, at least that's how I handle these cases now...
The text was updated successfully, but these errors were encountered:
@pfk84 Thanks for bringing this up, definitely a tricky one 👍
I think a feature that fixes this issue (like adding a timeout or something similar) will be a thing somewhere in the future, but this doesn't mean that implementing it will be a breeze. Do we add a default timeout value and is this the way to go? Everyone has a different use case, some developers use BLPOP with a few seconds timeout, some others have this thing running for several hours. As you can see it depends on different use cases, so finding a norm between all this is not easy.
Like always: PRs are welcome! 😉
As you said, using an internal timeout works for your use case and should work in most/all cases, but it would definitely be more convenient if this library supported this itself. Maybe we can achieve an interim solution by adding some sort of documentation to the README.md that addresses this issue and suggests a way to handle this.
@pfk84 Thank you for bringing this up! I've just filed #142 to keep track of the underlying feature request. I agree that detecting dead connections is something we should look into and provide better out-of-the-box support for.
I believe this has been answered, so I'm closing this for now. Please feel free to report back otherwise 👍
I've noticed that when executing a BLPOP and the Redis-Server "goes away" without closing the socket (very rare occasions, especially on production) the promise never returns making the whole connection unusable. If the server closes the connection, all is fine.
I know the library has by design no special handling for any Redis command but maybe in this case internally adding
React\Promise\Timer\timeout
would make sense, at least that's how I handle these cases now...The text was updated successfully, but these errors were encountered: