Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Redis-adapter -> reject(new Error("timeout reached while waiting for fetchSockets response"))

Aperta
#60 3 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
25/100
Tipo di issue
Bug
Chiarezza
Da chiarire
Stato di attività
Ferma
Stack tecnologico
express, redis, typescript
Ambito
backend, frontend

Direzione di ricerca

Reproduce the failure by opening the admin UI with the shown Socket.IO, Redis adapter, and Express setup. Start at node_modules/@socket.io/redis-adapter/dist/index.js around line 615 and trace the fetchSockets timeout and its callers. Done means identifying the cause and preventing the admin UI connection from crashing the server.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

hello.

I am configuring a socket.io server using pm2 and redis-adapter.
I'm using express to bring up the admin ui on the same port as socket.io.

public async connect(http_server: http.Server): Promise<void> {
    try {
      SocketIO.server = new Server({
        cors: {
          origin: "*",
          credentials: true
        },
        transports: ['websocket'],
        allowUpgrades: true,
      });
      const pubClient = createClient({
        socket: {
          host: process.env.REDIS_IP,
          port: <number><unknown>process.env.REDIS_PORT,
        },
        password: process.env.REDIS_PASSWORD
      });
      const subClient = pubClient.duplicate();
      await pubClient.connect();
      await subClient.connect();
      SocketIO.server.adapter(createAdapter(pubClient, subClient));
      SocketIO.server.attach(http_server);

      instrument(SocketIO.server, {
        auth: {
          type: "basic",
          username: "...",
          password: "^__^", 
        },
        mode: "development",
        serverId: `${hostname()}#${process.pid}`,
      });

    } catch (err) {

      process.exit(1);
    } 
  }

run it like this, it works without any problems, but when you connect to http://localhost:3900, the following message occurs after about 3 to 5 seconds.

D:\Project\socket\node_modules\@socket.io\redis-adapter\dist\index.js:615
                    reject(new Error("timeout reached while waiting for fetchSockets response"));
                           ^
Error: timeout reached while waiting for fetchSockets response
    at Timeout._onTimeout (D:\Project\socket\node_modules\@socket.io\redis-adapter\dist\index.js:615:28)
    at listOnTimeout (node:internal/timers:564:17)
    at processTimers (node:internal/timers:507:7)

https://admin.socket.io <- this url is Same.. the server crashes.

What's the problem? 😢

npm version

"dependencies": {
    "@socket.io/admin-ui": "^0.5.1",
    "@socket.io/redis-adapter": "^8.0.1",
    "express": "^4.18.2",
    "redis": "^4.0.4",
    "socket.io": "^4.5.4"
  },
Lingua principale
Vue
Stelle
413
Fork
109
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

  • Include un Dockerfile o un file Docker Compose
  • Nessun modello di pull request
  • Nessuna guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di socketio/socket.io-admin-ui

Tutte le issue di socketio/socket.io-admin-ui

Issue simili

Altre issue su Backend & API Design

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.