Redis connection in broken state retry aborted Docker containers Nodejs

Published

I am trying to dockerize nodejs redis application with docker and docker-compose. It outputs :

  • this warning redis image: WARNING overcommit_memory is set to 0! Background save may fail under low memory condition. To fix this issue add ‘vm.overcommit_memory = 1’ to /etc/sysctl.conf and then reboot or run the command ‘sysctl vm.overcommit_memory=1’ for this to take effect.

  • this error:
    Server listening the port 3000
    Error: Redis connection in broken state: retry aborted.
    at RedisClient.connection_gone (/usr/src/app/node_modules/redis/index.js:568:30)
    at RedisClient.on_error (/usr/src/app/node_modules/redis/index.js:345:10)
    at Socket. (/usr/src/app/node_modules/redis/index.js:222:14)

enter image description here

This is the docker-compose.yml file

enter image description here

Dockerfile code

enter image description here

Source: Docker Questions

Published
Categorised as containers, docker, docker-compose, node.js, redis Tagged , , , ,

Answers

Leave a Reply

Still Have Questions?


Our dedicated development team is here for you!

We can help you find answers to your question for as low as 5$.

Contact Us
faq