Containers suddenly die when inserting data into Couchbase 4.5 container

Expected behavior

Containers don’t unexpectedly die.

Actual behavior

I wrote a new Java web service to test using Couchbase as a data store for our application. I’m using docker-compose (config below) to stand up the application container (Dockerfile below) and a Couchbase 4.5 container. When I hit the API to insert new data into the Couchbase DB, occasionally all my running containers will die. Docker itself appears to be unaffected, or it restarts itself before I notice. There is nothing interesting in the app logs, couchbase logs, or Docker engine logs.

Information

Steps to reproduce the behavior

The application code is proprietary, so unfortunately I can’t share the image to reproduce.

Hello,

Could you please run “Diagnose & Feedback” from the :whale: menu, upload your diagnostic logs, and then post your diagnostic ID in this thread? This will enable us to take a look at your Docker.app logs so we can try to determine what is going wrong. You can also look at the logs yourself in Console.app which may show interesting messages around the time that you experience container loss.

My current guess is that your application requires more than 2 GB of real memory and Docker has only allocated 2 GB of RAM to the Linux VM running inside of it. Because of this, I speculate, your containers are being killed by Linux’s “oomkiller” which terminates processes using a lot of memory when the system has exhausted its RAM. You can try increasing the RAM allocated to Docker in :whale: -> Preferences… -> General (Memory). Our ticket #3482 tracks oomkiller notification.

Thanks for participating in the Docker for Mac Beta!

Best regards,

David

Hi David - thanks for the quick response. A few things:

  • I don’t seem to have the “Diagnose and Feedback” option in my menu. Here’s a screenshot of what my menu looks like.
  • I just downloaded the latest build of Docker for Mac (1.12.0-rc4-beta20 from beta17), and then I tried to reproduce the issue while looking at Console.app. Funny thing is that I’ve been unable to reproduce it even after removing the thread sleep in between inserts in my DB load script. I don’t know if this is some improvement in the latest Docker version or if something is different on my machine since the last time I ran the script, but I’ll keep trying to reproduce.

Thanks,
Jared

I was able to reproduce immediately after posting the above reply. Here’s what I see in Console.app:

7/27/16 11:27:02.709 AM Docker[94617]: exceeded maximum number of forwarded connections (900)
7/27/16 11:27:02.709 AM Docker[94617]: Socket.Stream: caught End_of_file

I believe the missing Diagnose & Feedback menu item should be available now in Beta 21. If you could try it out, cause the issue, and then use the diagnostic tool and report your diagnostic ID, we’d really appreciate it. One minor UI issue needs to be contended with: you must click the Open Issues button in order to upload your diagnostic bundle. You don’t need to file an issue but you can if you want.

Thanks!