From: jkatz (@jkatz) <noreply+jkatz@github.com>
To: pgvector/pgvector <noreply+pgvector-pgvector@github.com>
Subject: Re: [pgvector/pgvector] issue #643: OOM errors - during insertion and HNSW l1 INDEX builds on version "0.7.2"
Date: Mon, 19 Aug 2024 16:58:28 +0000
Message-ID: <gh-pgvector-pgvector-643-c2297023902@github.com> (raw)
In-Reply-To: <gh-pgvector-pgvector-643@github.com>
References: <gh-pgvector-pgvector-643@github.com>
Borrowing a bit from another issue, it's very similar to what Andrew suggests. Because your HNSW index build is exceeding the available memory to build the index, which is likely governed by your container (cgroup) limits, the OOM killer is taking out the process, even If you have more resources on the machine. If the memory in your container exceeds the threshold cgroup threshold, the OOM killer kills the process putting on the most memory pressure (Joe Conway has an [excellent blog on this topic](https://www.crunchydata.com/blog/deep-postgresql-thoughts-the-linux-assassin)).