About Heartbeat Ajax request pending status (suspended), stalled time is too long. involves a TCP connection exception.

Source: Internet
Author: User

Environment: Jingan Fast Cloud Server (heard very rubbish, but the company bought, I have just come), centos-6.8-x86_64,apache,mysql5.1,php5.3.

Problem: Now the company has a PHP system, need to send the AJAX request repeatedly, but there will be pending state, I need to solve this problem, or find the problem in the server, code, or client, and then have an account, but do not know where to start, after all, it is new AH.

Effect. Two features, 1: Is the further the request, pengding time, and most of the time is stalled occupied (this issue on the Internet has related articles, but there is no solution, I will post it); 2: This is the picture I set the 1s request once, and three requests at a time, If you set a bit longer such as 7s, this phenomenon will appear late.

My solution: The programmer said he didn't expect to come back to solve the problem ... Baidu, Google.

I first found the valuable article is this: about the request was suspended page load slow

Links: http://kb.cnblogs.com/page/513237/

The article concludes that there is no workaround, but a general description of the problem is the TCP connection, which is related to the Chrome browser, which is not too familiar with the socket, but is known to be related to the TCP handshake.

OK, the general article said with Chrome, so I went to test Firefox, still have this problem, so although this article is very good, it may not be related to me, I think.

Then I found an article: Stalled problem resolution in Chrome's timeline

Links: http://www.tuicool.com/articles/qQVj6nb

The problem with this article is similar to mine, which takes most of the time in stalled, and then he passes the grab kit to prove that it is TCP
Connected to the problem, as above, then the conclusion is network problems or service-side problems. Then I also went to download the same grab Bag tool, the effect is similar.

Of course, if it is a network problem, I have to explain, but there may be a service-side problem, so you have to continue to find.

And although I do not understand the grasp of the package tool inside the information, but the obvious error I can still see, that is, TCP Previous segment not captured, this error occurs very high frequency, I think this should be the TCP link exception related to the error, Therefore, I found the relevant article, found this: Capture packet analysis of "TCP Previous segment not captured";

Links: https://my.oschina.net/moooofly/blog/804568

The article describes a variety of reasons, listed a kind of, and posted the relevant capture package diagram, I a contrast, found to be almost the same as mine, but I do not understand the true meaning of each information, so can only be estimated this is the reason

The grasping package in this paper:

My bag-Grab diagram:

This picture is all wrong, but I can't read it.

Well, summed up, the above is my problem-solving process, Daniel to make a reference, I now want to know, the question is at which end, good to have an account.

About heartbeat Ajax request pending status (suspended), stalled time is too long. involves a TCP connection exception.

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.