Docker Tip #84: Fixing Obscure Docker Desktop Daemon Errors
If you're getting errors that you can't explain or you're getting different types of errors with the same code you might be out of memory.
A while back, we covered 3 ways to troubleshoot volumes not working with Docker for Windows in Docker Tip #72 but this tip applies to anyone using Docker Desktop (formerly known as Docker for Windows or Docker for Mac).
This tip is titled “obscure errors” because there is no single error that might be thrown due to running out of memory. When a system goes out of memory, often times unpredictable things will happen.
But in the Docker Desktop case you’ll likely start getting various Docker daemon errors.
Fortunately the fix is very easy. Just head over to your advanced Docker Desktop settings and add more memory:
In the above case I changed mine from 2GB of memory to 4GB and I haven’t run into any issues since then.
Keep in mind, you may need to raise yours if your Dockerized application is very memory hungry. In my case I had to load in a lot of data into PostgreSQL and before doing this the container would either hang forever or I’d eventually get various Docker daemon errors.