1

I have a MongoDB database on my server, which runs inside a docker container. I used to start the container using docker-compose. Recently I updated my docker to 17.03.1-ce and configured swarm mode on it.

Then I ran my mongodb container and tried to perform a large operation (reading ~10000000 collection using cursor) on it from java (using mongodb-async driver, if it matters) and it randomly fails with the message "Connection reset".

I tried to run mongodb by using simple docker run and it worked, however when I try to use it inside swarm mode using docker stack deploy --compose-file ... this error appeared. It may appear or may not, ~20% of all my tries tend to be successful.

MongoDB container log says nothing useful, just end connection like everything is ok.

Docker is installed on Ubuntu 16.04 LTS, using official MongoDB image mongo:3.4.

Hope anyone could help me. Thanks.

Elessar.perm
  • 751
  • 1
  • 9
  • 18

0 Answers0