Page MenuHomePhorge

php-fpm memory leak
Closed, ResolvedPublic

Asked by s.quinn on Sep 24 2024, 07:59.

Details

Getting a bad php-fpm memory leak, regularly consuming 5GB RAM and then getting killed by the O/S as server is running low on memory (8GB server in AWS). Seems to occur once every few days. Not a busy system. php 7.2.

php-fpm.ini settings:
pm = dynamic
pm.max_children = 10
pm.start_servers = 3
pm.min_spare_servers = 2
pm.max_spare_servers = 7
pm.max_requests = 300

php.ini:
memory_limit = 128M

Any hints? I assume there would be lots of reports if it was a general issue with phorge.

messages file:
Sep 23 12:05:11 ec2-18-130-84-214 kernel: out_of_memory+0x1bd/0x4e0
Sep 23 12:05:11 ec2-18-130-84-214 kernel: Tasks state (memory values in pages):
Sep 23 12:05:11 ec2-18-130-84-214 kernel: Out of memory: Killed process 584967 (php-fpm) total-vm:3855612kB, anon-rss:3088388kB, file-rss:2748kB, shmem-rss:32708kB, UID:48 pgtables:6648kB oom_score_adj:0
Sep 23 12:05:15 ec2-18-130-84-214 kernel: out_of_memory+0x1bd/0x4e0
Sep 23 12:05:15 ec2-18-130-84-214 kernel: Tasks state (memory values in pages):
Sep 23 12:05:15 ec2-18-130-84-214 kernel: Out of memory: Killed process 462485 (php-fpm) total-vm:5013312kB, anon-rss:4325268kB, file-rss:2820kB, shmem-rss:36548kB, UID:48 pgtables:9080kB oom_score_adj:0
Sep 23 12:06:43 ec2-18-130-84-214 kernel: out_of_memory+0x1bd/0x4e0
Sep 23 12:06:43 ec2-18-130-84-214 kernel: Tasks state (memory values in pages):
Sep 23 12:06:43 ec2-18-130-84-214 kernel: Out of memory: Killed process 585131 (php-fpm) total-vm:4101516kB, anon-rss:3351300kB, file-rss:2692kB, shmem-rss:33156kB, UID:48 pgtables:7164kB oom_score_adj:0
Sep 23 12:07:09 ec2-18-130-84-214 kernel: out_of_memory+0x1bd/0x4e0
Sep 23 12:07:09 ec2-18-130-84-214 kernel: Tasks state (memory values in pages):
Sep 23 12:07:09 ec2-18-130-84-214 kernel: Out of memory: Killed process 603398 (php-fpm) total-vm:4092572kB, anon-rss:3341416kB, file-rss:2816kB, shmem-rss:19428kB, UID:48 pgtables:7124kB oom_score_adj:0

Answers

New Answer

Answer

This question has been marked as closed, but you can still leave a new answer.