Microsoft/mssql-server-linux docker container - inconsistent errors

I have been attempting to use the docker executor with CircleCI 2 to have CI on one of my mssql projects, using Microsoft’s linux container. While running my builds locally with the CLI tool always results in success, in the CircleCI environment the operation of the mssql docker container is very inconsistent.

Failures occur in about half of the jobs run, and are always related to the mssql container. I see a few different types of issues:

  1. mssql container stops logging before normal startup completes
  2. error: “Timeout occurred while waiting for latch: class ‘LOG_MANAGER’, id 00000010C8FA0BB0, type 4, Task 0x000000048DA5C8C8 : 0, waittime 600 seconds, flags 0x1a, owning task 0x000000048DA708C8. Continuing to wait.” Container then dumps and stops operating.
  3. error: “Process 0:0:0 (0x1334) Worker 0x000000048BB24160 appears to be non-yielding on Scheduler 17. Thread creation time: 13148657463232. Approx Thread CPU Used: kernel 0 ms, user 0 ms. Process Utilization 100%. System Idle 0%. Interval: 70162 ms.” This appeared to happen during initialization, before the app container began running tests.
  4. error: “Transaction (Process ID 29) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction.” This also occurred before the app container began running tests; the SQL Server container was not yet responding to connection attempts.

I have used the machine executor with the same array of containers, and each time, it executes successfully as expected. So, this issue seems only to be present in the docker executor. Also, we attempted to increase resource limits to 4cpu/8GB to see if build resources were the problem; this has had no discernible effect.