-
Notifications
You must be signed in to change notification settings - Fork 754
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Out of memory error #1083
Comments
Any update on this? I've started getting the same error :( |
Originally posted about this at #1953 (comment) but CC'ing this issue since I'm seeing these "JavaScript heap out of memory" errors with BrowserSync via CLI as well (using I can reproduce this error in less than a minute in my project, since editing one include may trigger recompiles in ~91 files. 😅 |
@patricknelson Browsersync doesn't process any files - so I'm wondering if your example is being caused by the gulp setup? If you have the time, could you run browser-sync separately, whilst still compiling sass with gulp? |
@shakyShane This is actually entirely CLI. See #1953 (comment) for the First, start npx sass -w -s compressed scss:css Then kick off BrowserSync in another tab/window (also installed locally, e.g. npx browser-sync start --config .browser-sync.cjs Then a couple of edits later, a |
There is definitely some kind of weird nesting or recursion going on. When launching in debug mode to enable the inspector of NODE_OPTIONS='--inspect' browser-sync start --config .browser-sync.cjs If you kick off a No clue what's causing it though. Maybe after enough files + saves, it just gets so big that this starts happening? Maybe something isn't being cleaned up or freed? It's somewhere in the file watcher in |
This may actually be a bug either in Edit: Yep, after some tinkering with this setup purely with Edit: See also paulmillr/chokidar#1271 for fantastic detailed breakdown, which is what I think is also happening here. |
Alright made some progress on this. I do believe this is a bug somewhere in
So in my case, I was able to workaround the issue by changing my |
Issue details
I use BrowserSync along with IntelliJ, which automatically saves files. After a few hours, BrowserSync crashes due to an out of memory error.
Steps to reproduce/test case
Serve a project. Make many changes for a few hours, triggering many reloads.
Please specify which version of Browsersync, node and npm you're running
Affected platforms
Browsersync use-case
If CLI, please paste the entire command below
The text was updated successfully, but these errors were encountered: