CLOSE_WAIT? Close_wait is a headache when the project goes online.

Source: Internet
Author: User

CLOSE_WAIT? Close_wait is a headache when the project goes online.

The project is in beta testing and is about to be released soon. Now, the beta testing is very busy. Today, the O & M team sent a bunch of statuses and forgot about them. In short, there is a connection waiting to be closed when the HTTP request is sent, as a result, the CLOSE_WAIT status has been accumulated and has not been released. This will certainly cause problems for a long time.

 

Well, I have a closer look and found that this problem occurs when I call the SMS interface on the Internet. The api is provided by the SMS supplier.

 

HttpClient client = new HttpClient ();

PostMethod method = null;

......

Method. releaseConnection ();

Client. getHttpConnectionManager (). closeIdleConnections (0 );

When using HttpClient, You need to disable the release link, but this is not done in the api.

You only need to add the last two sentences. repacking and publishing can solve this problem.

 

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.