admin管理员组

文章数量:1318335

I have a random problem with Chrome (v60.0.3112.101 on Linux, but reproduced as well by end-users in production on other systems). There's a page that consists in a list of songs, and a click on any of them triggers an ajax request to fetch the file on the server (amongst other things).

After a certain number of "clicks" (never the same number, never on the same file), the ajax request that is supposed to fetch resource is shown as "pending" forever (I've waited more than 30 minutes for it to finish).

In the "Timing" tab of the developer tools panel, the request is shown as "stalled", and indeed, Nginx logs (we use it as a reverse proxy) and the backend application itself show that the request never reaches the server.

I've tried several things with no success whatsoever:

  • disabling the "prediction service to load pages quicker"
  • add a random uuid on every request to make sure the cache is not used
  • updating jquery and soundmanager2 (which is the library that starts the request)
  • started Chrome with no extensions

I also tried to re-run the request from the Developer Tools console, and it stays in a pending state as well.

url = "/api/download/songs/7969/28962/28962_original.mp3?download_key=81b285e61f7880a0a07a977dbc47b78a1d57e3690263a646da65a261957f979a&r=" + Math.random();
$.get(url);

The problem does not seem to happen on Firefox.

Unfortunately, I can't show you more code than this.

Is this a known bug of Chrome? Are there any known workarounds?

I have a random problem with Chrome (v60.0.3112.101 on Linux, but reproduced as well by end-users in production on other systems). There's a page that consists in a list of songs, and a click on any of them triggers an ajax request to fetch the file on the server (amongst other things).

After a certain number of "clicks" (never the same number, never on the same file), the ajax request that is supposed to fetch resource is shown as "pending" forever (I've waited more than 30 minutes for it to finish).

In the "Timing" tab of the developer tools panel, the request is shown as "stalled", and indeed, Nginx logs (we use it as a reverse proxy) and the backend application itself show that the request never reaches the server.

I've tried several things with no success whatsoever:

  • disabling the "prediction service to load pages quicker"
  • add a random uuid on every request to make sure the cache is not used
  • updating jquery and soundmanager2 (which is the library that starts the request)
  • started Chrome with no extensions

I also tried to re-run the request from the Developer Tools console, and it stays in a pending state as well.

url = "/api/download/songs/7969/28962/28962_original.mp3?download_key=81b285e61f7880a0a07a977dbc47b78a1d57e3690263a646da65a261957f979a&r=" + Math.random();
$.get(url);

The problem does not seem to happen on Firefox.

Unfortunately, I can't show you more code than this.

Is this a known bug of Chrome? Are there any known workarounds?

Share Improve this question asked Aug 22, 2017 at 11:02 juliencjulienc 20.4k19 gold badges85 silver badges85 bronze badges 1
  • 1 I'm pretty sure I've experienced the same with videos on Chrome. I believe Chrome only allows a certain number of service threads (per domain) for media downloads, and the trick is that if you begin, but do not finish, streaming a piece of media, it continues occupying the thread. For me the solution was to add preload of none or metadata to my video tags. You may need to somehow stop streaming content that is already streaming. – arbuthnott Commented Aug 22, 2017 at 11:14
Add a ment  | 

1 Answer 1

Reset to default 3

Seems that you are reaching the max http connections in Chrome. There are many posts related to that area in here. This post might help you How to solve Chrome's 6 connection limit when using xhr polling

本文标签: javascriptAjax request pending forever on ChromeStack Overflow