In one of our projects, there is an application which loads a little over 2000 (two thousand) class files, as well as several applications which load fewer (typically 1000-1600). The one with over 2000 cannot be loaded in Chrome, as the final 30 or so class files fail with the error net::ERR_INSUFFICIENT_RESOURCES.
Below is one example of this;
GET http://localhost:8080/_g/code/transpiled/path/to/Class.js net::ERR_INSUFFICIENT_RESOURCES
loadScript @ index.js:55669
flushScriptQueue @ index.js:55789
begin @ index.js:55561
init @ index.js:55575
(anonymous) @ index.js:55963
Create a project with 2000 classes (this may take some time)
Serve the project
open with Chrome (Safari, Firefox appear to have no issue loading)
Observe the exceptions
Expected behavior
The application ought to load
Desktop (please complete the following information):
OS: MacOS Ventura 13.6.3
Browser: Chrome 120, Chrome Dev 122
Additional context
This can be avoided by appending the following query parameter to the application url, which disables parallel loading and loads classes at a pace Chrome is able to keep up with.
For MacOS (potentially Linux also), modifying the process limits and file limits in ulimit or by modifying .plist files achieves nothing in relation to this.
Interestingly, everyone else working on this application is using Chrome and is having no problem. My Mac is using an Intel processor, while they are using both M1 chips and Intel processors.
All things considered, we have absolutely no idea why this issue is appearing. It seems like it's okay in prod when everything is bundled, but in dev where it is not Chrome hits it's limit.
We've not tested this out on other OSes (only MacOS) or many browser versions (latest Chrome, Chrome Dev, Firefox, and Safari for Ventura 13.6.3 at the time of writing).
Describe the bug
In one of our projects, there is an application which loads a little over 2000 (two thousand) class files, as well as several applications which load fewer (typically 1000-1600). The one with over 2000 cannot be loaded in Chrome, as the final 30 or so class files fail with the error
net::ERR_INSUFFICIENT_RESOURCES
.Below is one example of this;
followed later by;
To Reproduce Steps to reproduce the behavior:
Expected behavior The application ought to load
Desktop (please complete the following information):
Additional context
This can be avoided by appending the following query parameter to the application url, which disables parallel loading and loads classes at a pace Chrome is able to keep up with.
For MacOS (potentially Linux also), modifying the process limits and file limits in
ulimit
or by modifying.plist
files achieves nothing in relation to this.Interestingly, everyone else working on this application is using Chrome and is having no problem. My Mac is using an Intel processor, while they are using both M1 chips and Intel processors.
All things considered, we have absolutely no idea why this issue is appearing. It seems like it's okay in prod when everything is bundled, but in dev where it is not Chrome hits it's limit.
We've not tested this out on other OSes (only MacOS) or many browser versions (latest Chrome, Chrome Dev, Firefox, and Safari for Ventura 13.6.3 at the time of writing).