chenkunlong 发表于 2013-1-28 14:47:40

Socket脚本Select timed out 问题

压Socket脚本时,发送一个包然后等待返回值,在20个并发时,就会报错,日志如下,请各位看看有没遇到过,要如何解决呢。

=================================SENT BUFFER=================================       
        "\x01\x00\x01\x00\x01\x00\x01\x00"
        "\a"
        "\x02\x00\x01\x01\x00\x01\x00"
        "<message><user><serialid>4856</serialid><mobilecode>951656001</mobilecode>"
        "<type>ucsp</type>\r\n"
        "<command>iscomingReq</command>\r\n"
        "<role>0</role>\r\n"
        "<isResult>0</isResult>\r\n"
        "<time>2012-12-06 16:16:39</time><level>0</level>\r\n"
        "<version>1.0.0</version>\r\n"
        "<param1></param1>\r\n"
        "<param2>233</param2>\r\n"
        "<business>ACD</business>\r\n"
        "</user><body><caller>951656001</caller><index>0000</index><group>0020</gro"
        "up><proId>13</proId><opeId>02</opeId>\r\n"
        "<orsn>20121206006816</orsn><called>137355991381</called><bizorsn>0102</biz"
        "orsn>\r\n"
        "</body></message>"
       
===============================================================================       
Action.c(112): callSend: Mon Jan 28 14:26:22.828: About to send 535 bytes to socket0 (524)       
Action.c(112): callSend: Mon Jan 28 14:26:22.828: Waiting for writable socket 10 secs, 0 usecs       
Action.c(112): callSend: Mon Jan 28 14:26:22.828: Trying to send 535 bytes       
Action.c(112): callSend: Mon Jan 28 14:26:22.828: Sent in this iteration 535 bytes (total in all iterations 535 bytes)       
Action.c(113): lrs_receive(socket0, buf4)       
Action.c(113): fiInitRecv: socket: socket0 (524), buffer: buf4, expected size: 537       
Action.c(113): callRecv: Mon Jan 28 14:26:22.828: About to read 537 bytes from socket0 (524)       
Action.c(113): fiPerformReceive: Mon Jan 28 14:26:22.828: Waiting for readable socket 10 secs, 0 usecs       
Action.c(113): fiPerformReceive: Mon Jan 28 14:26:32.828: Select timed out       
Action.c(113): Mismatch in buffer's length (expected 537 bytes, 0 bytes actually received, difference in 537 bytes)       
Action.c(113): fiCheckRecvMismatch: Mon Jan 28 14:26:32.828: reading buffer buf4       
Action.c(113): fiCheckRecvMismatch: Mon Jan 28 14:26:32.828: calling parameterization routines       
================================EXPECTED BUFFER================================       
       
===============================================================================       
Action.c(113): getAsciiReceivedBuffer: Mon Jan 28 14:26:32.828: Translate data for printing       
Action.c(113): getAsciiReceivedBuffer: Mon Jan 28 14:26:32.828: Binary to ascii       
================================RECEIVED BUFFER================================       
       
===============================================================================       
Action.c(113): callRecv:0 bytes were received       
页: [1]
查看完整版本: Socket脚本Select timed out 问题