using nginx and php7.3-fpm I run into a huge problem. Using
watch -n 1 "ps -eo rss,cmd --sort=-rss | grep 'php-fpm' | awk '{cmd=\"\"; for(i=2; i<=NF; i++) cmd = cmd \$i \" \"; rss[cmd] += \$1} END {for (cmd in rss) printf \"%.8f GB: %s\\n\", rss[cmd]/1024/1024,cmd}' | grep 'php-fpm: pool mydomain.com' | grep -v 'grep php-fpm' | awk '{print \$1}'"
I monitor the memory usage of all my running php-fpm: pool example.com
processes. It's dynamic, 150 idle processes and 1 running - so everything's not that bad.
Now the problem is, that the Memory consumption of my process increases every time I open a website like https://www.example.com/script.php, and the script has this code :
<?php
exit();
?>
After running this code, the memory used by php-fpm: pool example.com
processes increases and does not drop after the script is finished. So this looks like a memory leak to me. What is the reason behind it?