Log more when redis increment fails

This commit is contained in:
Ajay 2024-09-15 04:30:44 -04:00
parent 8ba68e1b4c
commit eeb9f1b02f

View file

@ -30,7 +30,7 @@ export async function getStatus(req: Request, res: Response, server: Server): Pr
redisProcessTime = Date.now() - redisStartTime; redisProcessTime = Date.now() - redisStartTime;
return e; return e;
}).catch(e => /* istanbul ignore next */ { }).catch(e => /* istanbul ignore next */ {
Logger.error(`status: redis increment timed out ${e}`); Logger.error(`status: redis increment timed out ${e}\nload: ${os.loadavg().slice(1)} with ${JSON.stringify(getRedisStats())}\n${JSON.stringify((db as Postgres)?.getStats?.())}`);
return [-1]; return [-1];
}); });
statusRequests = numberRequests?.[0]; statusRequests = numberRequests?.[0];