如何解决connection reset by peer

来源:学生作业帮助网 编辑:作业帮 时间:2024/05/11 03:05:38
如何解决connection reset by peer

如何解决connection reset by peer
如何解决connection reset by peer

如何解决connection reset by peer
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 failed: [10054] Connection reset by peer"
"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后记得关.