6

How to free PHP-FPM memory?

view full story
linux-howto

http://serverfault.com – There are several discussions complaining high memory usage of PHP-FPM, without any practical approach to overcome. As I explored the problem with numerous tests, the problem is related to the age of PHP-FPM age. Imagine we have pm.max_children = 10, and have a PHP script consuming 10M memory. One expects needing 100MB of MB. This is correct for the first 10 processes. After processing 20 PHP scripts, the system memory usage is 200MB, which means that the memory consumed during the first 10 processes have not been freed. This will increase the memory usage until reaching pm.max_requests when (HowTos)