录制c/s结构下的winsocket通信,在vuser_ini中创建连接(lrs_create_socket),在action中发送数据(send),在vuser_end中关闭连接(lrs_close_socket),但是现在的问题是在使用controller运行场景时,运行一段时间出现failed transactions,error的具体信息如下: =========================解决方式汇总,仅供参考
经常出现的Connection reset by peer: 原因可能是多方面的,不过更常见的原因是:①:服务器的并发连接数超过了其承载量,服务器会将其中一些连接Down掉;②:客户关掉了浏览器,而服务器还在给客户端发送数据;③:浏览器端按了Stop
[10054] Connection reset by peer Connection reset by peer is a tough one because it can be caused by so many things. In all cases, the server determines that the socket is no longer good and closes it from its side. Read Error Scenario: Mary couldn't make out what Joe was saying anymore, so she hung up rather than lose his messages (data). A read error occurs when a server cannot successfully read from a user's client. Servers gather information from the client by text, setup, and other items.When the server receives an error when reading from a client, it then disconnects the user, resulting in a read error quit message. Write Error Scenario: Mary was trying to talk to Joe but didn't think she was getting through, so she hung rather than lose his messages (data). A write error occurs when a server cannot successfully write to a user's client. When the server receives information, it usually responds with information of its own. When the server receives an error when writing to a client, it then disconnects the user, resulting in a write error quit message similar to the read error format. Ping Timeout Error Scenario: Mary, having been raised in a household with too many kids and always craving attention, keeps asking to make sure that Joe is still on the line and listening. If he doesn't reply fast enough to suit her, she hangs up. Servers automatically ping users at a preset time. The reason for this is to ensure the client is still connected to the server. When you see "PING? PONG!" results in your status window, it means the server has pinged your client, and it has responded back with a pong to ensure the server that you are still connected. When this does not happen and you disconnect without the server's knowledge, the server will automatically disconnect the user when it does not receive a response, resulting in a ping timeout. Ping timeouts occur to EVERYONE. Broken pipe Error Scenario: Mary had picked up a sticky note with a message she needed to relay to Joe, but somehow between her hand and her mouth, the message got misplaced. Mary was trying to talk to Joe but didn't think she was getting through, so she hung up rather than lose his messages (data). A broken pipe error occurs when the server knows it has a message but can't seem to use its internal data link to get the data out to the socket. Miscellaneous Scenario: Lots of other reasons; perhaps the operator broke in and gave Mary a message that made her doubt the validity of the call so she hung up. 方法:1、排除了程序问题
Problem Description: Error: "-27780: read to host failed: [10054] Connection reset by peer"
The user gets the following error messages during replay of a Web script: "Error -27780: read to host "Error -27790: Failed to read data from server Diagnosis: The client sends a POST request to the server and gets a response with HTTP status 200, connection close and redirection using both JS code and meta-refresh. There is no content-length, so the client is supposed to decide when to close the connection. Internet Explorer closes the connection before sending the request to the redirection URL. But, LoadRunner does not; later the server closes the connection, and the result is the error message. -------------------------------------------------------------------------------- Solution: Use web_set_sockets_option ("CLOSE_KEEPALIVE_CONNECTIONS", "1") Add the following step after the POST step: web_set_sockets_option("CLOSE_KEEPALIVE_CONNECTIONS", "1"); This step closes all the open connections, and as a result, LoadRunner stops waiting for the rest of the response of the redirection. 答案其实一样,打开socket后记得关。
Connection reset by peer: socket write error错误分析及解决
2010年03月16日 星期二 下午 4:29
|