matchID-project / deces-backend

API Personnes décédées
https://deces.matchid.io/deces/api/v1/docs
GNU Lesser General Public License v3.0
9 stars 4 forks source link

Redis unavailability raises uncatched error in backend and makes backend unavailable #382

Open rhanka opened 11 months ago

rhanka commented 11 months ago

when redis is down the following error appears in log : Error: connect ETIMEDOUT at Socket.<anonymous> (/deces-backend/node_modules/ioredis/built/Redis.js:170:41) at Object.onceWrapper (node:events:627:28) at Socket.emit (node:events:513:28) at Socket._onTimeout (node:net:580:8) at listOnTimeout (node:internal/timers:573:17) at process.processTimers (node:internal/timers:514:7) { errorno: 'ETIMEDOUT', code: 'ETIMEDOUT', syscall: 'connect' } It should be catched and timestamped as a json log of the backend

Moreover, when this happen, the backend can't handle even a simple search request. This is a bug, redis should only block the bulk api.