problem with a thread

Thanks for the extra context.
You can change the vm.min_free_kbytes sysctl parameter, which appear tunable as part of compose 2.1: sysctls in docker-compose.yml.
Please let us know if this helps.