How to limit memory and cpu for containers in drone 1.0.0-rc1?
Memory limit in .drone.yml
I hit memory problem. I need at least 4G virtual memory. Is the receipe above still working for docker runners?
The error I have is:
465 CMakeFiles/xxx.make:1234: recipe for target ‘CMakeFiles/xxxe.cpp.o’ failed
466 virtual memory exhausted: Cannot allocate memory
467 make: *** [CMakeFiles/xxx.o] Error 1
The configuration syntax in this thread is used to limit memory, not to allocate memory. Docker containers have access to unlimited memory by default and are only subject to limits imposed by the process manager or host machine operating system.
Hi how to debug this? Thanks for the help!
when I run docker inspect <container_id>, I saw like this:
Is it possible you are running concurrent builds on the same machine and are exhausting memory resources? If your builds are resource intensive you should consider lowing the maximum number of pipelines that can run in parallel on a single machine, and install runners on multiple machines for increased parallelism.
also this might help if you are testing this on docker for mac / windows (this may not be relevant)
It turns out build passed on 8G memory machine. so it is somehow physical memory issue but reported as virtual memory. I don’t know why there is such a thing as physical memory is kind invisible to the docker machine