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

Error: timeout reached while waiting for fetchSockets response #506

Open
donfire opened this issue Jul 7, 2023 · 4 comments
Open

Error: timeout reached while waiting for fetchSockets response #506

donfire opened this issue Jul 7, 2023 · 4 comments
Labels
question Further information is requested

Comments

@donfire
Copy link

donfire commented Jul 7, 2023

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.1
we get the following error

/node_modules/@socket.io/redis-adapter/dist/index.js:712
                    reject(new Error("timeout reached while waiting for fetchSockets response"));
                           ^

Error: timeout reached while waiting for fetchSockets response

I have been hitting my head for a while now on this.

@darrachequesne
Copy link
Member

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 fetchSockets() operation was added in v4, so the v4 server sends the operation to all the servers but only other v4 servers respond, so the operation times out (even though the server has received all necessary responses).

Not sure how to handle this though. Maybe some kind of feature detection?

@darrachequesne darrachequesne added the question Further information is requested label Aug 11, 2023
@cody-evaluate
Copy link

I am seeing this as well

@introspection3
Copy link

me too

@HannaSamia
Copy link

Any updates ???, still encountering the same issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

5 participants