What does "Blocked" really mean in the Firefox developer tools Network monitoring?

FirefoxFirefox Developer-ToolsNetwork Monitoring

Firefox Problem Overview


The timing section of the Firefox Network Monitor documentation, "Blocked" is explained as:

> Time spent in a queue waiting for a network connection. > > The browser imposes a limit on the number of simultaneous connections that can be made to a single server. In Firefox this defaults to 6

Is the limit on the number connections the only limitation? Or is the browser blocked waiting to get a connection from the OS count as blocked too?

In a fresh browser, on a first connection, before any other connection is made (so the limit should not apply here), I get blocked for 195 ms.

enter image description here

Is this the browser waiting for the OS? Was does "Blocked" mean here?

Firefox Solutions


Solution 1 - Firefox

We changed the Firefox setting (about:config) 'network.http.max-persistent-connections-per-server' to 64 and the blocks went away. We changed it back to 6. We changed our design/development method to a more 'asynchronous' loading method so as not to have a large number simultaneous connections. The blocks were mostly loading a lot of png flags for locale settings.

Solution 2 - Firefox

I have a server that takes several seconds to respond, which allowed me to cross-reference the firefox measurement with a wireshark trace. I see that the first SYN is sent out immediately. The end of the "Blocked" time corresponds to when the Server Hello comes back.

I couldn't relate the end of "TLS setup" to any wireshark packet. It extends a few seconds belong the last data that is exchanged on the initial TLS connection.

Bottom line: it doesn't look like the time spent in "Blocked" and "TLS setup" is very reliable, at least in some cases.

My setup has a TLS reverse proxy that forwards the connection with SNI. I'm not sure if that might be related.

Solution 3 - Firefox

> Time spent in a queue waiting for a network connection. > > The browser imposes a limit on the number of simultaneous connections > that can be made to a single server. In Firefox this defaults to 6, > but can be changed using the > network.http.max-persistent-connections-per-server preference. If all > connections are in use, the browser can't download more resources > until a connection is released.

Source : https://developer.mozilla.org/en-US/docs/Tools/Network_Monitor

It's very clear that the browser fixes the limit to 6 concurrent connections per server (domains/IP), the OS question is not very relevent.

Solution 4 - Firefox

In my case both waiting for network connection and DNS lookup times were pretty high, up to 2 seconds each, caused significant page load times if the page was loaded for the first time. Firefox was freshly installed without addons and just started with no other opened tabs. I tried on both Ubuntu 18.04 LTS and Ubuntu 19.04 with the same results. Although my ISP doesn't provide support, my router assignes IPv6 addresses. As it turned out the problem was the IPv6 broken network, which forced Firefox to fall back to IPv4 (of course after some time(time-out)). After I turned off the IPv6 support in Linux the requests speeded up significantly. Here is a relavant discussion: https://bugzilla.mozilla.org/show_bug.cgi?id=1452028

Solution 5 - Firefox

I encountered this error whilst using an Angular 9 'dist' deployment. I discovered that the error appeared because I was trying to access an unreachable API, according to the specified IP address and port.

Therefore to solve it, I just have to reference a valid and accessible API.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionYves DorfsmanView Question on Stackoverflow
Solution 1 - FirefoxMr. de SilvaView Answer on Stackoverflow
Solution 2 - FirefoxArnoutView Answer on Stackoverflow
Solution 3 - FirefoxKarl.SView Answer on Stackoverflow
Solution 4 - FirefoxSzilveszter ZsigmondView Answer on Stackoverflow
Solution 5 - FirefoxtonderaimuchadaView Answer on Stackoverflow