- 积分
- 198
- 威望
-
- 金钱
-
- 注册时间
- 2012-3-21
- 在线时间
- 小时
- 最后登录
- 1970-1-1
|
系统centos7 ,lnmp1.3,php7.0 ,mysql5.7.,内存4G,双核心。安装了memcached,启用了opcache
[root@ebs-49291]# netstat -anpo | grep "php-cgi" | wc -l
1
[root@ebs-49291]# free -m
total used free shared buffers cached
Mem: 3832 3112 719 0 451 483
-/+ buffers/cache: 2177 1654
Swap: 0 0 0
[root@ebs-49291]#top
top - 09:10:35 up 23:57, 1 user, load average: 0.32, 0.30, 0.27
Tasks: 167 total, 1 running, 166 sleeping, 0 stopped, 0 zombie
Cpu(s): 0.3%us, 0.2%sy, 0.0%ni, 99.0%id, 0.5%wa, 0.0%hi, 0.0%si, 0.0%st
Mem: 3924164k total, 3229268k used, 694896k free, 462044k buffers
Swap: 0k total, 0k used, 0k free, 497168k cached
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
4805 www 20 0 419m 44m 35m S 1.3 1.2 0:03.47 php-fpm
4818 www 20 0 419m 49m 37m S 0.3 1.3 0:04.80 php-fpm
5909 root 20 0 15032 1268 928 R 0.3 0.0 0:00.05 top
30754 mysql 20 0 2295m 1.7g 7836 S 0.3 45.6 7:01.13 mysqld
1 root 20 0 19356 1364 1048 S 0.0 0.0 0:01.16 init
探针显示的系统负载均衡
nginx.conf部分配置:
worker_processes auto;
error_log /home/wwwlogs/nginx_error.log crit;
pid /usr/local/nginx/logs/nginx.pid;
worker_rlimit_nofile 51200;
worker_connections 51200;
fastcgi_connect_timeout 300;
fastcgi_send_timeout 300;
fastcgi_read_timeout 300;
fastcgi_buffer_size 64k;
fastcgi_buffers 4 64k;
fastcgi_busy_buffers_size 128k;
fastcgi_temp_file_write_size 256k;
gzip on;
gzip_min_length 1k;
gzip_buffers 4 16k;
gzip_http_version 1.1;
gzip_comp_level 2;
php-fpm.conf部分配置:
listen = /tmp/php-cgi.sock
listen.allowed_clients = 127.0.0.1
pm.max_children = 200
pm.start_servers = 20
pm.min_spare_servers = 20
pm.max_spare_servers = 200
request_terminate_timeout = 100
request_slowlog_timeout = 0
opcache配置:
[Zend Opcache]
opcache.enable=1
zend_extension=/usr/local/php/lib/php/extensions/no-debug-non-zts-20151012/opcache.so
opcache.enable_cli=1
opcache.memory_consumption=128
opcache.interned_strings_buffer=8
opcache.max_accelerated_files=4000
opcache.revalidate_freq=60
opcache.fast_shutdown=1
opcache.file_cache=/tmp
探针里php相关参数
/usr/local/php/var/log/php-fpm.log部分错误:
[11-Mar-2017 21:41:49] NOTICE: fpm is running, pid 24916
[11-Mar-2017 21:41:49] NOTICE: ready to handle connections
[12-Mar-2017 06:11:16] WARNING: [pool www] child 24920 exited on signal 11 (SIGSEGV - core dumped) after 30567.129989 seconds from start
[12-Mar-2017 06:11:16] NOTICE: [pool www] child 2347 started
[12-Mar-2017 06:23:51] WARNING: [pool www] child 24918 exited on signal 11 (SIGSEGV - core dumped) after 31322.164367 seconds from start
[12-Mar-2017 06:23:51] NOTICE: [pool www] child 2608 started
[12-Mar-2017 08:18:08] WARNING: [pool www] child 24922 exited on signal 11 (SIGSEGV - core dumped) after 38178.746541 seconds from start
[12-Mar-2017 08:18:08] NOTICE: [pool www] child 4785 started
[12-Mar-2017 08:18:10] WARNING: [pool www] child 24926 exited on signal 11 (SIGSEGV - core dumped) after 38180.449634 seconds from start
[12-Mar-2017 08:18:10] NOTICE: [pool www] child 4787 started
[12-Mar-2017 08:18:12] WARNING: [pool www] child 24925 exited on signal 11 (SIGSEGV - core dumped) after 38182.988441 seconds from start
[12-Mar-2017 08:18:12] NOTICE: [pool www] child 4789 started
[12-Mar-2017 08:18:31] NOTICE: Finishing ...
[12-Mar-2017 08:18:31] NOTICE: exiting, bye-bye!
[12-Mar-2017 08:18:32] NOTICE: fpm is running, pid 4802
[12-Mar-2017 08:18:32] NOTICE: ready to handle connections
nginx_errors.log部分数据:
2017/03/11 17:37:40 [crit] 21838#0: *1 connect() to unix:/tmp/php-cgi.sock failed (2: No such file or directory) while connecting to upstream, client: 106.38.241.141, server: aaaaaaa.com, request: "GET /index.php?title=Index.html&category-view-2-82_html=&mobileaction=toggle_view_desktop HTTP/1.1", upstream: "fastcgi://unix:/tmp/php-cgi.sock:", host: "aaaaaaaaaa.com"
2017/03/11 17:55:28 [crit] 29396#0: *1 connect() to unix:/tmp/php-cgi.sock failed (2: No such file or directory) while connecting to upstream, client: 106.38.241.141, server: aaaaaaaa.com, request: "GET /title/%E5%A4%8F%E6%9E%AF%E8%8D%89 HTTP/1.1", upstream: "fastcgi://unix:/tmp/php-cgi.sock:", host: "aaaaaaaaa.com" |
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有账号?注册
x
|