Docker image is killed periodically when running subprocess

I ran a subprocess in Python. I don’t think the subprocess itself is exiting abnormally and in either case, I catch the exception in the code if it does. What happens is that the Docker container itself dies with a 137 exit code. I didn’t see an OOM error when running Docker inspect. Also, when monitoring the memory utilization, it doesn’t come close to the limit. I’m running Docker version 18.06.1-ce, build e68fc7a and docker-compose version 1.22.0, build f46880fe.