From the github issue seems like it not possible as there is no EC2 instance or Host ivolvole in Fargate.
the workarounds for the max_map_count
error appear to be setting max_memory_map
directly on the host (which may result in undesirable side effects, or using the sysctl flag on on the docker run command. Unfortunately, neither of these options are not supported in Fargate since it involves interacting with the container instance itself.
But the other way is to increase file limit
and disable mmap
check.
I had to properly configure U limits on my ECS task definition, something like:
"ulimits": [
{
"name": "nofile",
"softLimit": 65535,
"hardLimit": 65535
}
]
I've disabled mmap in ElasticSearch, which gets rid of the max_map_count
setting requirement. This can be done by configuring the sonar.search.javaAdditionalOpts SonarQube
setting. I wasn't able to do it with an environment variable since ECS seems to be eating them, but in the end I just passed it as a parameter to the container, which works since the entrypoint is set and consumes arguments properly. In my case:
"command": [
"-Dsonar.search.javaAdditionalOpts=-Dnode.store.allow_mmapfs=false"
]
sonarqube disable nmap