After running the application for a long time, I began to receive this error:
“status”: “500”,
“message”: “Reached the max retries per request limit (which is 20). Refer to "maxRetriesPerRequest" option for details.”,
“stack”: “MaxRetriesPerRequestError: Reached the max retries per request limit (which is 20). Refer to "maxRetriesPerRequest" option for details.\n at Socket. (/opt/node_app/node_modules/ioredis/built/redis/event_handler.js:182:37)\n at Object.onceWrapper (node:events:628:26)\n at Socket.emit (node:events:513:28)\n at TCP. (node:net:301:12)”
Restarting the container Redis helped to get rid of the error.
Why does this problem with sockets/Redis arise and is there anything that can be done to prevent it from appearing in the future?