Linux SQL Standard Edition being killed by OOM killer We have launched Linux with SQL Server standard edition for production environment, but the memory restriction feature in SQL Server is not working properly.

The server has a total of 32 GB of RAM.  We initially allocated 25 GB to SQL Server in mssql.conf and experienced crashes due to the OOM killer.

We have since reduced this to 18 GB memory, but it's still utilizing all the server memory, and the service is eventually killed. 

What else can we do to prevent the SQL Server service from being killed by the OOM Killer?
Are there are other applications / workloads running on the server when SQL Server gets killed?

If Linux detects memory pressure, SQL Server will be the easy target - even if it's staying with the 18 GB limit you set.  Imagine SQL Server using 18GB, and 3 other applications using 6 GB each.  The Linux kernel will target the SQL Server process to free up RAM, because it is using the most of any single process.

You should monitor memory usage by all apps on the box leading up to the crash.  If other apps are using a lot of RAM, you should consider either:


removing them, or
further reducing the memory available to SQL Server


If SQL Server is really exceeding its limits, your best bet is likely to contact Microsoft support.

For a real life example, see this article from SQL Server support for recommendations on avoiding the OOM Killer:

How to safeguard SQL Server on Linux from OOM-Killer