Page MenuHomePhabricator

Donations queue consumer killed by OOM killer
Open, LowPublic

Description

Looks like we have a memory leak in the donations queue consumer. It had some ridiculous allocations last night while consuming (mostly recurring donations) and the OOM killer had to kill it.

I think these are 4kb blocks:

total-vmrsspgtable_bytes
121204155915465295124215296

That 'rss' number translates to about 64GB

Out of memory: Killed process 503689 (php) total-vm:4848166236kB, anon-rss:61861180kB, file-rss:0kB, shmem-rss:0kB, UID:33 pgtables:121304kB oom_score_adj:0

grepping donations_queue_consume-20260917-065001.log shows it only handled 72 messages before it was , which doesn't seem like a lot.

Event Timeline

Hi @Ejegg, please associate one or more active project tags with this task (via the Add Action... → Change Project Tags dropdown). That will allow to see a task when looking at project workboards or searching for tasks in certain projects, and get notified about a task when watching a related project tag. Thanks.

Looks like a lot fewer OOMs this year than last

/srv/archive/frlog1002/logs/error-20260507.gz:May 6 18:33:30 civi1002 run-job[44797]: Recurring queue consume failed with code 137
/srv/archive/frlog1002/logs/error-20260509.gz:May 8 00:21:56 civi1002 run-job[2229201]: Recurring queue consume failed with code 137
/srv/archive/frlog1002/logs/error-20260706.gz:Jul 5 02:52:57 civi1002 run-job[671875]: Donations queue consume failed with code 137
/srv/archive/frlog1002/logs/error-20260918.gz:Sep 17 06:52:51 civi1002 run-job[503561]: Donations queue consume failed with code 137

@Ejegg do we know all the php memory limit in the settings of these php jobs? I think I read we use the maximum when searching in civi1002, but I'm not sure I read the correct php ini file. I wonder if a strategy to determine what is happening is to lower that limit (assuming is currently set to the max) so that php hits the 'out of memory' issue before the system does, and maybe we will get some useful error messages when this happens again?

@Laurabarluzzi in this case there was no artificial lower limit - the PHP process went out of control and consumed all the resources available on the system besides the little bit reserved for the kernel, and the kernel noticed and killed the process so everything else could keep running.