I understand that this problem may have very little to do with CentOs, but it happens to occur on a CentOS webserver and maybe you’ll have a clue.
Since a few months, after many upgrades on several blogs (now running with PHP7), our server is eating up RAM no end. PHP processes swell to over 2 GB (each) and when the whole RAM and the whole swap are full, problems stack up and finally paralyze the system. This despite having “memory_limit = 512M" in all php.ini (there are several PHP versions on the system, selection is made via .htaccess).
CenOS 6.9 on a Xeon 8 cores with now 64 GB RAM. This is a snip of a top this morning, just 2 days after the latest reboot:
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
31163 apache 20 0 939m 690m 8876 S 51.5 1.1 102:16.90 php-fpm
29603 apache 20 0 1208m 961m 10m S 33.7 1.5 136:54.95 php-fpm
11858 apache 20 0 1660m 1.4g 9564 R 31.3 2.2 190:41.25 php-fpm
31207 apache 20 0 916m 668m 9636 R 18.1 1.0 101:38.72 php-fpm
31218 apache 20 0 930m 682m 9264 S 16.8 1.1 101:55.51 php-fpm
2873 apache 20 0 1694m 1.4g 9972 S 11.2 2.2 194:42.82 php-fpm
2854 apache 20 0 1657m 1.4g 10m S 9.9 2.2 191:15.43 php-fpm
2326 mysql 20 0 4993m 1.3g 6076 S 7.3 2.0 149:11.06 mysqld
2842 apache 20 0 1664m 1.4g 8996 S 4.9 2.2 191:34.00 php-fpm
17085 apache 20 0 1454m 1.2g 9824 S 1.3 1.9 167:25.43 php-fpm
13850 apache 20 0 464m 45m 5872 S 1.0 0.1 0:43.55 httpd
20044 root 20 0 15276 1496 952 R 1.0 0.0 15:05.99 top
1936 apache 20 0 1684m 1.4g 10m S 0.7 2.2 192:37.37 php-fpm
19109 apache 20 0 463m 44m 5808 S 0.7 0.1 0:18.66 httpd
24782 apache 20 0 465m 46m 5720 S 0.7 0.1 0:12.01 httpd
1848 apache 20 0 1579m 1.3g 10m S 0.3 2.1 183:02.13 php-fpm
2718 root 20 0 1074m 12m 2536 S 0.3 0.0 7:32.85 fail2ban-server
15221 apache 20 0 475m 49m 9508 S 0.3 0.1 0:22.24 httpd
16764 apache 20 0 476m 49m 9456 S 0.3 0.1 0:21.82 httpd
17757 apache 20 0 461m 42m 5784 S 0.3 0.1 0:18.26 httpd
19108 apache 20 0 463m 44m 5848 S 0.3 0.1 0:20.80 httpd
19155 apache 20 0 463m 44m 5756 S 0.3 0.1 0:17.15 httpd
24791 apache 20 0 462m 43m 5764 S 0.3 0.1 0:14.87 httpd
24794 apache 20 0 464m 45m 5780 S 0.3 0.1 0:15.07 httpd
29668 apache 20 0 459m 40m 5888 S 0.3 0.1 0:34.05 httpd
29794 apache 20 0 463m 44m 5868 S 0.3 0.1 0:35.23 httpd
31184 apache 20 0 936m 688m 9572 S 0.3 1.1 103:33.80 php-fpm
31212 apache 20 0 908m 660m 9860 S 0.3 1.0 101:27.74 php-fpm
Any idea, suggestion would be greatly appreciated! --