Answer the question
In order to leave comments, you need to log in
Why is there a constant increase in RAM consumption in php-fpm?
In php-fpm, there is a constant increase in RAM consumption, ~ + 1% per day.
And after 3 weeks you have to restart the server due to lack of RAM.
I noticed this when I typed top in the terminal:
466 root 20 0 469980 43080 35132 S 0.0 0.4 1:08.70 `- php-fpm: master process (/opt/plesk/php/7.1/etc/php-fpm.conf)
909 web 20 0 1610096 1.121g 27336 S 0.3 9.8 25:50.36 `- php-fpm: pool сайт
911 web 20 0 1609788 1.119g 25584 S 0.7 9.7 26:15.04 `- php-fpm: pool сайт
Answer the question
In order to leave comments, you need to log in
Set pm.max_requests
to recreate processes after a certain number of processed requests.
I believe that the memory is not released due to the fact that its consumption is caused by an increase in the number of HTTP connections, with a DBMS, or something else.
You need to profile the application to know the reason.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question