Follow either one of the following steps to overcome the issue. This is an operating system level feature and it is not possible to control it from an application.
1). Increase RAM (physical memory). This would give additional room for the engine to run.
2). Decrease the heapsize of the engine. When out-of-memory (OOM) killer is triggered, this process may survive though other processes may suffer.
3). Change the overcommit_memory setting to 2. This will make sure that the process is getting enough memory before starting. This will provide a stable environment but will limit you to run only few applications.
A user would need to decide where the trade off should occur based on their business need. Either they can take the risk and run more applications by over committing or run few applications by enforcing a hard limit.