Connection reset by peer problem summary and solution, connectionpeer

Source: Internet
Author: User
Tags connection reset

Connection reset by peer problem summary and solution, connectionpeer

I searched for Chinese and English websites, searched the corners I could find, found the cause and principle of the fault, and how to solve the problem. Here I will record it and hope to help some friends who need it, if you do not need to take a detour, you can sort out the content as follows:

Connection reset by peer problem summary and Solution

1. When the number of concurrent connections on the server exceeds its capacity, the server closes some of the connections.

If you know that the number of concurrent clients connecting to the server does not exceed the server load, it may be a virus or Trojan, causing network traffic exceptions.

Solution: run the netstat-an command to view network connections.

2. The client closes the browser, and the server is still sending data to the client.

3. the browser presses Stop

These two cases generally do not affect the server. However, if the exception information is not specially processed, the exception may be repeated in the server log file, resulting in the server log file being too large, the operation of the server is affected.

Solution: try... Catch exceptions, and then do not output or output only one prompt to avoid all exceptions.

4. Firewall Problems

If the network connection passes through the firewall, and the firewall usually has a timeout mechanism, when the network connection does not transmit data for a long time, the TCP session will be closed and then read and write, this will cause exceptions.

Solution: If the firewall is disabled and the problem is solved, you need to reconfigure the firewall or write your own program to implement TCP persistent connections.
To achieve TCP persistent connections, you need to define the heartbeat protocol and send the heartbeat protocol at intervals. Both parties maintain the connection.

5. JSP buffer Problems

The default JSP page cache is 8 KB. When the JSP page data is large, it is possible that JSP is not completely transmitted to the browser.

Solution: Adjust the buffer size.

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

Thank you for reading this article. I hope it will help you. Thank you for your support for this site!

Related Article

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.