Open Bug 1370670 Opened 7 years ago Updated 2 years ago

network.http.max-connections default of 900 is too high, causes many timeout failures when loading large tab group


(Core :: Networking: HTTP, defect, P3)

54 Branch




(Reporter: zlynx, Unassigned)


(Keywords: reproducible, Whiteboard: [necko-backlog])

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:54.0) Gecko/20100101 Firefox/54.0
Build ID: 20170529025115

Steps to reproduce:

I have a web comics bookmark folder with a bit over 100 sites in it. I right click on this to open all of them most every day.

Actual results:

With the default max-connections of 900, a majority of the tabs need to be reloaded when I get to them because their network connections timed out during the load. Many image resources have to be shift-reloaded because they got only a partial download.

With a setting of 32 max-connections (which may be too low), every single resource on every tab loads correctly.

Expected results:

Instead of opening 900 connections to 200+ HTTP servers, Firefox should either default to a lower number of connections or it should monitor request latency and only open more connections when existing connections are still working.
Component: Untriaged → Networking: HTTP
Product: Firefox → Core
I'm having an idea to limit total number of connections for background tabs for a long time already.

I've made already some very basic local experiments with it with no bad impact on performance (if even done correctly, tho!)

Hence, I think there is something we can do here.
Blocks: CDP
Assignee: nobody → honzab.moz
Whiteboard: [necko-active]
It's been collectively decided to not fix this bug any time soon.  The main reason is to avoid any logic queuing deadlocks that websites may suffer from.  Also, local testing doesn't show any huge effect on performance.
Assignee: honzab.moz → nobody
No longer blocks: CDP
Whiteboard: [necko-active] → [necko-backlog]
Bulk change to priority:
Priority: -- → P1
Bulk change to priority:
Priority: P1 → P3
I remember when the default was much lower because Windows XP sp1 or sp2, I believe, had maxed the number of connections to 10. The rationale at Microsoft was that a) end user workstations were not servers so they didn't need to keep that many connections alive and b) to reduce the proliferation of malware that would spray a network with connections to try to infect many machines at once.
Many people would apply a hack that modified tcpip.sys to increase the value to maybe 50-100 to torrent more. I also patched a Windows XP box that was used as a web server that was butting up against the limit (Windows Event logs would tell you if you were exceeding the max 10 connections.)  Currently it's set to 900 which sounds pretty greedy.  I've had a home network where a few thousand concurrent connections would saturate the network for everyone else.

I guess it depends on the workload but I would be curious to see telemetry to know what an average and extreme value might be.  The default for FFox for Android, for example, is currently set to 20.  To me, if there is that much disparity between the desktop and mobile version and based on years of observing that number back-in-the-day, I couldn't see many reasons to be > 100.  I mean 100 or more would probably be malware or a really poorly designed app that established hundreds of database queries all at once to display content on the screen.

I just wanted to give some context because it's still very rare for an end user application to spray that many connections unless it's intentionally greedy.  Most home routers max at like 4096 which means like 4 Firefoxes would saturate.
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.