Re: Help in dealing with OOM

From: Joe Conway <mail(at)joeconway(dot)com>
To: Siraj G <tosiraj(dot)g(at)gmail(dot)com>, pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: Help in dealing with OOM
Date: 2024-10-14 19:08:58
Message-ID: 37308daa-3860-455f-b9f0-567a982c4554@joeconway.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 10/14/24 14:37, Siraj G wrote:
> This is from the OS log (/var/log/kern.log):
>
> oom-
> kill:constraint=CONSTRAINT_NONE,nodemask=(null),cpuset=/,mems_allowed=0,global_oom,task_memcg=/system.sli      ce/system-postgresql.slice/postgresql(at)12-main(dot)service,task=postgres,pid=2334587,uid=114
>   494 Oct 14 09:58:10 gce-k12-prod-as1-erp-pg-secondary kernel:
> [6905020.514569] Out of memory: Killed process 2334587 (postgres) total-
> vm:26349584kB, anon-rss:3464kB, file-rss:0kB, shmem-rs
>  s:21813032kB, UID:114 pgtables:49024kB oom_score_adj:0

1. Do you happen to have swap disabled? If so, don't do that.

2. Does the postgres cgroup have memory.limit (cgroup v1) or memory.max
(cgroup v2) set?

3. If #2 answer is no, have you followed the documented guidance here
(in particular vm.overcommit_memory=2):


https://www.postgresql.org/docs/12/kernel-resources.html#LINUX-MEMORY-OVERCOMMIT

--
Joe Conway
PostgreSQL Contributors Team
RDS Open Source Databases
Amazon Web Services: https://aws.amazon.com

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Zac Warham 2024-10-14 20:11:49 Changing postgres User
Previous Message Siraj G 2024-10-14 18:37:57 Help in dealing with OOM