秀米云香港服务器

# more nginx/error.log2010/08/18 14:42:19 [error] 18256#0: *264534 readv() failed (104:Connection reset by peer) while reading upstream, client:6.217.236.22, server: wo.china.com, request: "GET /list/index/rcreated/HTTP/1.0", upstream: "fastcgi://127.0.0.1:10080", host:"www.hichina.com"2010/08/18 14:46:55 [error] 18254#0: *272781 upstream prematurelyclosed connection while reading response header from upstream,client: 6.217.236.22, server: wo.china.com, request: "GET /top/HTTP/1.0", upstream: "fastcgi://127.0.0.1:10080", host:"www.hichina.com"2010/08/18 14:46:55 [error] 18254#0: *272781 open()"/var/www/nginx-default/50x.html" failed (2: No such file ordirectory), client:6.217.236.22, server: wo.china.com, request: "GET /top/HTTP/1.0", upstream: "fastcgi://127.0.0.1:10080", host:"www.hichina.com"

# more kern.logAug 18 14:42:18 w23 kernel: [2524799.982979] php-cgi[30124]:segfault at 45 ip 082da5bf sp bfd89c50 error 4 inphp5-cgi[8048000+4cc000]

序列号 CPU RAM HDD 带宽 售价(美元) 免费试用
香港服务器1 E5-2620 32G 1T HDD 50M/无限流量 $196.00 立即申请
香港服务器2 E5-2650 32G 1T HDD 50M/无限流量 $256.00 立即申请
香港服务器3 E5-2680 32G 1T HDD 50M/无限流量 $316.00 立即申请
香港服务器4 E5-2690 32G 1T HDD 50M/无限流量 $336.00 立即申请
香港服务器5 E5-2697 32G 1T HDD 50M/无限流量 $376.00 立即申请
香港服务器6 E5-2620*2 32G 1T HDD 50M/无限流量 $376.00 立即申请
香港服务器7 E5-2650*2 32G 1T HDD 50M/无限流量 $436.00 立即申请
香港服务器8 E5-2680*2 32G 1T HDD 50M/无限流量 $476.00 立即申请
香港服务器9 E5-2690*2 32G 1T HDD 50M/无限流量 $556.00 立即申请
香港服务器10 E5-2697*2 32G 1T HDD 50M/无限流量 $596.00 立即申请
香港服务器11 E5-2680v4*2 32G 1T HDD 50M/无限流量 $696.00 立即申请
香港服务器12 E5-2698v4*2 32G 1T HDD 50M/无限流量 $796.00 立即申请

出现这种问题的原因:# ab -c 1000 -n 10000http://www.hichina.com/list/index/rcreated/

在用ab测试之前:[email protected]:/var/log# netstat -anpActive Internet connections (servers and established)Proto Recv-Q Send-Q LocalAddressForeign AddressState PID/Program nametcp0 0127.0.0.1:100800.0.0.0:*LISTEN4145/php-cgi在用ab测试之后:[email protected]:/var/log# netstat -anp|moreActive Internet connections (servers and established)Proto Recv-Q Send-Q LocalAddressForeign AddressState PID/Program nametcp0 0127.0.0.1:100800.0.0.0:*LISTEN4145/php-cgi说明:在用ab测试后cgi的pid相同,说明不是网上说的“由于php-cgi重启或者cgi进程死掉造成的”

$ ps aux|grep php-cgi|wc 514 5655 42144

# ulimit -acore filesize (blocks,-c) 0data segsize(kbytes, -d) unlimitedschedulingpriority(-e) 0filesize(blocks, -f) unlimitedpendingsignals(-i) 16382max locked memory (kbytes, -l)64max memory size(kbytes, -m) unlimitedopenfiles(-n) 1024pipesize(512 bytes, -p) 8POSIX message queues (bytes, -q) 819200real-timepriority(-r) 0stacksize(kbytes, -s) 8192cputime(seconds, -t) unlimitedmax userprocesses(-u) unlimitedvirtualmemory(kbytes, -v) unlimitedfilelocks(-x) unlimited

ab压力测试,问题及原因:# ab -c 515 -n 1000 http://192.168.206.121/2010/08/26 10:35:03 [alert] 13342#0: *8353 socket() failed (24: Toomany open files) while connecting to upstream, client:192.168.206.120,

server: localhost, request: "GET / HTTP/1.0", upstream:"fastcgi://127.0.0.1:10080", host:"192.168.206.121"(超过了cgi进程的个数)

2010/08/26 10:53:16 [alert] 15016#0: *4644 1024worker_connections are not enough while connecting to upstream,client: 192.168.206.120, server:

localhost, request: "GET / HTTP/1.0", upstream:"fastcgi://127.0.0.1:10080", host:"192.168.206.121"(增加worker_connections的数量)

2010/08/26 17:26:21 [error] 12936#0: *685388 connect() failed(111: Connection refused) while connecting to upstream, client:192.168.206.121,

server: localhost, request: "GET /info.php HTTP/1.0", upstream:"fastcgi://127.0.0.1:10080", host: "192.168.206.121"

标题:Nginx错误日志分析

地址: https://www.yunhk.xyz/26353.html