-
Type:
Improvement
-
Resolution: Fixed
-
Priority:
Minor
-
Component/s: amazon-ecs-plugin
-
None
https://github.com/jenkinsci/amazon-ecs-plugin/pull/38
Rather than setting a hard limit on the container memory, instead support setting the soft limit (memoryReservation) and use this as the scheduling resource constraint.
The purpose of this is to allow the memory of a container to go above the soft limit rather than having the hard limit kill the Jenkins Slave Agent JVM or the OOM-killer in the kernel randomly kill stuff which essentially makes your builds unstable without any information as to why,
I would have really preferred to not have to set memory or memoryReservation at all (which the API doco suggests you can do), but the API requires that you set at least one of these, so IMO it's better to define the soft limit as the required one & optionally set the hard limit if you want to be mean to your containers.