我们正在对我们的游戏服务器堆栈进行负载测试,该堆栈由 haproxy/ssl -> node.js(应用服务器)-> 数据库组成
调用是获取,然后 node.js 将其传递给数据库,然后将数据返回给客户端,但是在各种测试期间,我们看到了各种我们似乎无法追踪的奇怪问题。
运行 tcpdump 'tcp[13] & 4!=0' | grep http-alt
我们在日志中看到了各种各样的东西:
23:35:16.049886 IP xx > xx.http-alt: Flags [R], seq 2946709660, win 0, length 0
23:35:16.668370 IP xx.62737 > xx.http-alt: Flags [R.], seq 4204676699, ack 3037703652, win 68, options [nop,nop,TS val 153103530 ecr 133109021], length 0
23:36:06.030500 IP xx.40290 > xx.http-alt: Flags [R.], seq 431162404, ack 2610577956, win 68, options [nop,nop,TS val 153115871 ecr 133121361], length 0
退出我们看到的命令
过滤器接收到 1662286 个数据包 9 个数据包被内核丢弃
我们的负载测试应用程序也将错误返回给我们.. 沿着这条线
T000023 --- loop started --- 19 Aug 2013 18:09:07.975 ---r"
T000023r"
T000023 <<< user_id = nullr"
T000023 <<< ext_userid = nullr"
T000023 <<< Public_token_put = nullr"
T000023 <<< Private_token_prt = nullr"
T000023 >>> execute plug-in #1: GenerateRandomCharactersr"
T000023r"
T000023r"
T000023 # Page #1: Registrationr"
T000023 # ---------------------r"
T000023r"
T000023 [1] GET https://someurl.com:2222/?method=somemethod&type=reg=somerandomid ...r"
T000023 -8 (Network Connection aborted by Server), [No Content Type], --- bytes, --- ms, * Failed at 'Open Network Connection', java.net.SocketException: Connection resetr"
T000023 error: expected HTTP status: 200 <> received: -8 (Network Connection aborted by Server), [No Content Type], --- bytes, --- ms, ** Failed at 'Open Network Connection', java.net.SocketException: Connection resetr
关于从哪里开始的任何想法..
服务器是 ubuntu 12.04 服务器,对 sysctl 进行了一次调整
net.netfilter.nf_conntrack_max = 262144