I've a following network log in chrome:
I don't understand one thing in it: what's the difference between filled gray bars and transparent gray bars.
I've a following network log in chrome:
I don't understand one thing in it: what's the difference between filled gray bars and transparent gray bars.
Google gives a breakdown of these fields in the Evaluating network performance section of their DevTools documentation.
Stalled/Blocking
Time the request spent waiting before it could be sent. This time is inclusive of any time spent in proxy negotiation. Additionally, this time will include when the browser is waiting for an already established connection to become available for re-use, obeying Chrome's maximum six TCP connection per origin rule.
(If you forget, Chrome has an "Explanation" link in the hover tooltip and under the "Timing" panel.)
Basically, the primary reason you will see this is because Chrome will only download 6 files per-server at a time and other requests will be stalled until a connection slot becomes available.
This isn't necessarily something that needs fixing, but one way to avoid the stalled state would be to distribute the files across multiple domain names and/or servers, keeping CORS in mind if applicable to your needs, however HTTP2 is probably a better option going forward. Resource bundling (like JS and CSS concatenation) can also help to reduce amount of stalled connections.
file:///C:/...
–
Leontina async
tag from the inline script tag? It's actually an invalid attribute on inline scripts. –
Forsooth DevTools: [network] explain empty bars preceeding request
Investigated further and have identified that there's no significant difference between our Stalled and Queueing ranges. Both are calculated from the delta's of other timestamps, rather than provided from netstack or renderer.
Currently, if we're waiting for a socket to become available:
- we'll call it stalled if some proxy negotiation happened
- we'll call it queuing if no proxy/ssl work was required.
https://developer.chrome.com/docs/devtools/network/reference/?utm_source=devtools#timing-explanation
This comes from the official site of Chome-devtools and it helps. Here i quote:
Since many people arrive here debugging their slow website I would like to inform you about my case which none of the google explanations helped to resolve. My huge stalled times (sometimes 1min) were caused by Apache running on Windows having too few worker threads to handle the connections, therefore they were being queued.
This may apply to you if you apache log has following note:
Server ran out of threads to serve requests. Consider raising the ThreadsPerChild setting
This issue is resolved in Apache httpd.conf. Uncomment : Include conf/extra/httpd-mpm.conf
And edit httpd-mpm.conf
<IfModule mpm_winnt_module>
ThreadLimit 2000
ThreadsPerChild 2000
MaxConnectionsPerChild 0
</IfModule>
Note that you may not need 2000 threads, or may need more. 2000 was OK for my case.
My case is the page is sending multiple requests with different parameters when it was open. So most are being "stalled". Following requests immediately sent gets "stalled". Avoiding unnecessary requests would be better (to be lazy...).
We hit this issue today and we have found QUIC protocol making this issue. We have disabled QUIC from chrome://flags and site started to working.
I recently had an issue with a request stalling as well. This may be helpful if you have exhausted all other fixes mentioned in other answers.
If you are using the fetch API for requests, then you may want to also try removing the 'keep-alive' property in the request options.
This was an annoying bug for me and removing this got rid of the stalling issue.
One other scenario when a fetch can stall: when you fetch
the same URL multiple times in parallel, if the fetch is configured to use the cache (which is on by default for GET), the second fetch will wait in the "stalled" state for the first fetch to complete.
This is true in Chrome but not in Firefox. I did not test Safari.
Not that there are many reasons to do this intentionally - but it can happen naturally in React Strict Mode, when effects are called twice. So if you see stalls in those, either ignore it (as it's dev only) or disable caching, eg with fetch(url, { cache: no-store })
.
© 2022 - 2024 — McMap. All rights reserved.