vatesfr / xen-orchestra

The global orchestration solution to manage and backup XCP-ng and XenServer.
https://xen-orchestra.com
Other
773 stars 262 forks source link

fix(xo-server-perf-alert): improve performances and reliability #7692

Closed fbeauchamp closed 4 months ago

fbeauchamp commented 4 months ago

Description

review by commit

from ticket 24847

today one rrd query is done per object, per refresh. So a smart mode refresh can make hundred of queries at the same time, reaching these errors that keeps orphan tasks hanging


2024-05-27T12:57:00.095Z xo:xo-server-perf-alert WARN other side closed {
  error: SocketError: other side closed
      at Socket.<anonymous> (/home/florent/xen-orchestra/node_modules/undici/lib/dispatcher/client-h1.js:681:24)
      at Socket.emit (node:events:529:35)
      at Socket.patchedEmit [as emit] (/home/florent/xen-orchestra/@xen-orchestra/log/configure.js:52:17)
      at endReadableNT (node:internal/streams/readable:1400:12)
      at processTicksAndRejections (node:internal/process/task_queues:82:21) {
    code: 'UND_ERR_SOCKET',
    socket: {
      localAddress: '192.168.1.180',
      localPort: 35944,
      remoteAddress: '192.168.1.45',
      remotePort: 80,
      remoteFamily: 'IPv4',
      timeout: undefined,
      bytesWritten: 1155,
      bytesRead: 302854
    },
    call: { method: 'host.get_servertime', params: [Array] }
  }
}

Checklist