Connection reset by peer problem Summary and solution _javascript skills

Source: Internet
Author: User
Tags connection reset

Search the English and Chinese websites, rummaged around the corner, found the cause and principle of failure, and how to deal with, here, record, hope to help the need for small partners, less take a detour, the above on the finishing content:

Summary and solution of connection reset by peer problem

1. The number of concurrent connections to the server exceeds its load, and the server closes some of the connections

If you know the actual number of concurrent clients connected to the server does not exceed the server load, it is possible to be a virus or trojan, causing network traffic anomalies.

workaround : You can use the Netstat-an command to view network connectivity.

2. The client has turned off the browser and the server is sending data to the client

3. The browser presses the stop

These two situations generally do not affect the server, but if the exception information is not specifically handled, it is possible in the server's log file, repeated the exception, causing the server log file too large, affecting the server's operation.

workaround : You can catch an exception by using Try...catch on the part that causes the exception, and then do not output or output only one message to avoid outputting all the exception information.

4. Problems with Firewalls

If the network connection through the firewall, and the firewall will generally have a time-out mechanism, when the network connection for a long time does not transfer data, will shut down the TCP session, and then read and write after shutdown, will cause an exception.

Workaround: If you turn off the firewall, fix the problem, reconfigure the firewall, or write your own program to implement TCP's long connection.
To implement a long connection to TCP, you need to define your own heartbeat protocol, which sends a heartbeat protocol at a time, and the two sides maintain the connection.

5.JSP buffer problem

JSP page Default cache 8K, when the JSP page data is larger, it is possible that the JSP is not fully passed to the browser.

Solution : The size of the buffer can be adjusted appropriately.

<%@ page buffer= "100k"%>

Thank you for reading, I hope to help you, thank you for your support for this site!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.