我发现,可能服务器的日志有很多HTTP 400的错误请求,源自使用Chrome浏览器的客户端,具有类似DOS的快速间隔。 (每秒40-50个请求)
[16/Oct/2015:12:57:02 +0200] "-" 400 0 "-" "-"
在Nginx中启用信息日志logging:
client sent SYN_STREAM frame for stream 7 with invalid header block while processing SPDY, client: xx.xx.xx.xx, server: 0.0.0.0:443
debugging模式logging:
http uri: "/" http args: "" http exten: "" premature end of spdy header block spdy send RST_STREAM sid:51 st:1 spdy close stream 51, queued 0, processing 1 http close request http log handler http pinba handler free: 000000000219B010, unused: 282 free: 000000000203A2D0, unused: 2080 spdy frame complete pos:0000000001B30CC0 end:0000000001B31396 process spdy frame head:80030001 f:1 l:430 spdy SYN_STREAM frame sid:53 prio:4 posix_memalign: 000000000219B010:4096 @16 posix_memalign: 000000000203A2D0:4096 @16 process spdy header block 420 of 420 spdy inflate out: ni:0000000001B30E76 no:000000000203A5EE ai:0 ao:257 rc:0 spdy header block has 11 entries
禁用spdy解决了这个问题。
我使用Nginx作为反向caching代理。 后端也使用Nginx和php-fpm。
我使用Debian jessie的Nginx版本:1.8.0-1〜dotdeb + 8.2
Jessie-backports 1.9.4-1〜bpo8 + 1版本给出了相同的结果。
仅使用Google Chrome版本46.0.2490.71和45.0.2454.101的客户端的百分比出现问题