简体   繁体   中英

Http request --> net_error = -101 (ERR_CONNECTION_RESET)

Now ,i encounter a case.

This period of time,my website is very slow some time(Only one request,so it would not be request blocking).

I observe that when the page runs slowly,it 's timing performance as 在此处输入图片说明

And i open chrome://net-internals/#events, find the result:

在此处输入图片说明

what 's wrong? what happened in the time between t(29) and t(18933)?

dns lookup? nginx queueing?

Well, the fact is that you don't have only one request to the server.

  1. Even if you have the web page open in a single tab, there might be multiple connections for different resources.

  2. If you are using a proxy server, then all the requests go to the proxy server, causing requests to block.


Read the answer to a similar problem :

The cause of the problem is multiple simultaneous connections to the server. Every browser has a limit to the maximum number of TCP connections to a server. For chrome, the limit is six. The problem is more prominent when you are using a proxy server, because all the requests go the same server (the proxy server).

Chrome doesn't allow you to change this limit. It shouldn't in fact. If you want to know more about why this limit exists, and what are the limits for other browsers, you can read this article .

The reason why this limit is rarely a problem is because multiple HTTP requests to the same host are mostly sent consecutively, rather than parallely, preferably over the same TCP connection.

If this problem occurs to you frequently, then the reason might be:

  1. Server doesn't support persistent TCP connection: If the problem occurs only when accessing a particular server, the reason might be that chrome is fetching multiple resources (like images, CSS files, etc) on parallel connections. Since, in your case, the server is on your local network, you might want to ask the server's administrator to add support for persistent TCP connections.

  2. Multiple persistent connections are open: If you are working behind a proxy server, then downloading multiple files simultaneously or opening sites which keep a TCP connection open might be the cause of your problem.To get rid of it, all you can do is to not download many things simultaneously (or download in a different browser, if you have to).

PS: The error net_error = -101 (ERR_CONNECTION_RESET) is because of the timeout, waiting for some previous connection to the server to close.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM