i have over 100 wordpress websites on a server with 64GB ram and 16 processors
I recently isolated 5 of them with PHP-FPM pool, but in the process also migrated them from php7.4-fpm to php8.3-fpm.
Now both php7.4-fpm and php8.3-fpm are running. The 5 websites have 50 processes on startup each, and the other 95+ websites have around 256 processes on startup altogether with .conf configuration for php7.4-fpm.
Just as i isolated these 5 websites, i noticed drastic increase in RAM memory consumption over time, in 2-3 days, the RAM usage went from 30GBs to 57GBs out of 61GBs available.
And the only processes that are holding such memory are /usr/sbin/mysqld i.e. mysql processes. I haven’t changed anything in mysql configuration and it just started consuming so much VIRT and RES memory that i think it affects the RAM overall.
Here is a screenshot of htop table currently.
htop screenshot
I have been dealing with this problem for too long, and i am desperate to find a solution. What should i do? I hope for help.
After noticing the problem, i have tweaked (increased) innodb_buffer_pool_size
to 24G instead of 12G
increased innodb_buffer_pool_instances
from 1 to 24
introduced innodb_redo_log_capacity = 8G
and removed innodb_log_file_size
(because it is deprecated
added innodb_log_buffer_size = 16G
and
innodb_flush_log_at_trx_commit = 2
but the result is still the same, htop shows RED color in the VIRT
column and as i increase the innodb_buffer_pool_size
, it also increases in parallel and is now 32.5G and mysqld has over 50 processes like this running.
I am wondering, does the isolation of websites have something to do with this problem?
Zhivko Apostoloski is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.