I have a problem where services that are linked (ie. web and database) constantly work / not work.
panic: read tcp 10.7.0.29:50890->10.7.0.18:27017: i/o timeout
panic: no reachable servers
The database is MongoDB:
mongodb: image: 'mongo:latest' command: 'mongod --auth' ports: - '27017:27017' - '28017:28017' privileged: true restart: always
The web service connects to it like so:
environment: - 'MONGO_URL=mongodb://user:password@mongodb:27017/production' links: - mongodb
The problem is, sometimes it works, sometimes it doesnt, sometimes it works on service X but not on service Y, sometimes it works on 2/4 containers of service Y.
This is driving me crazy.
What do I do? Why can’t linked containers just work?
I’ve had this issue for months now. Fresh stack creation doesn’t help.