解决VPS内存耗尽问题
【httpd】
按占用内存top排序:
top - 15:11:07 up 13:05, 2 users, load average: 0.00, 0.00, 0.00
Tasks: 56 total, 1 running, 55 sleeping, 0 stopped, 0 zombie
Cpu(s): 0.0%us, 0.0%sy, 0.0%ni,100.0%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st
Mem: 1048576k total, 996912k used, 51664k free, 0k buffers
Swap: 1048576k total, 78376k used, 970200k free, 101460k cached
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
906 www 20 0 179m 54m 6900 S 0.0 5.3 0:10.50 httpd
903 www 20 0 179m 53m 5920 S 0.0 5.2 0:15.37 httpd
904 www 20 0 181m 51m 4252 S 0.0 5.0 0:11.71 httpd
905 www 20 0 179m 38m 3808 S 0.0 3.7 0:11.83 httpd
907 www 20 0 178m 37m 3664 S 0.0 3.7 0:10.10 httpd
1819 www 20 0 148m 30m 5144 S 0.0 3.0 0:02.96 httpd
775 mysql 20 0 641m 21m 2764 S 0.0 2.1 0:07.82 mysqld
1813 www 20 0 139m 21m 4968 S 0.0 2.1 0:03.86 httpd
1814 www 20 0 194m 16m 4956 S 0.0 1.7 0:02.96 httpd
修改/www/wdlinux/apache/conf/extra/httpd-mpm.conf
更改
MaxRequestsPerChild 0
为
MaxRequestsPerChild 50
WEB由双引擎切换为ngix单引擎
【php-fpm】
修改/www/wdlinux/etc/php-fpm.conf
request_terminate_timeout = 120
【sshd】
修改/etc/ssh/sshd_config
ClientAliveInterval 120
ClientAliveCountMax 3
发表评论