The problem
Every so often I stumble upon a Windows container which refuses to run with mem_limit set with the following exception:
Error response from daemon: hcsshim::CreateComputeSystem {container_guid}: The requested resource is in use.
Interestingly, it runs just fine, if I omit the mem_limit setting. The value of mem_limit can be anything and it can affect any container, even those that used to work just fine.
My setup
OS: Windows 10 Pro 20H2, but I've been having this problem on pretty much all the versions of Windows 10 I had. Docker version: 20.10.5, build 55c4c88 RAM: 64 GB
How to reproduce the problem
I don't know, but it seems that restoring Docker to factory defaults helps. (it does seem to help only if your data-root is the default one, which is not the case for me.)