-
Notifications
You must be signed in to change notification settings - Fork 488
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
Error: timeout reached while waiting for fetchSockets response #506
Comments
Hi! If I understand correctly, you have a cluster of servers, some in v2.5.0 and some in v4.7.1. I think the problem is that the Not sure how to handle this though. Maybe some kind of feature detection? |
I am seeing this as well |
me too |
Any updates ???, still encountering the same issue |
I was gonna make an issue but I'm glad this is here. This comment is just a investigation "report" of the code and why it behaves this way (AFAIK) My best guess is there are multiple things to consider and investigate. Some steps to consider:
These lines below handle the response and expects (waits for) K number of responses. So if you have 3 instances running, it will expect 2 response (3 - self) and will not clear the timeout until all responses are received. This is the code that generates the timeout error (for reference): Note that this will unconditionally throw an error; My point (3) is arguably the least possible, but never says never. The reason I'm saying this is because the number of responses expected K is generated via socket.io-redis-adapter/lib/index.ts Line 736 in cdb5535
which uses redis. TLDR:
Take away: My proposed solution to maintainers (cc @darrachequesne) : |
We are using two version of socket io.
For
v2.5.0 => "socket.io-redis": "^5.4.0"
v4.7.1 => @socket.io/redis-adapter": "^8.0.1"
transport is working fine when we are pushing the messages but whenever we are running
const sockets = await io.to('bridge-room').fetchSockets();
on v4.7.1we get the following error
I have been hitting my head for a while now on this.
The text was updated successfully, but these errors were encountered: