-
Notifications
You must be signed in to change notification settings - Fork 27.2k
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
Memory leak when refreshing during rebuild #1428
Comments
Like an infinite loop? |
Maybe, but a loop on its own wouldn't cause the browser to fill up the RAM. Interestingly enough it hasn't happened (yet) with chrome. |
@nmaro are you using the latest version of Next. |
@nmaro I tried with our Is it possible for you to isolate that? |
I'm gonna close this for now. Feel free to re-open with some ways to re-produce this. |
I am using Next.js and sometimes I get infinite loop inside Firefox browser when I open developer tools. Version of Nextjs is 2.4.0 and Firefox 53. Other than that, sometimes when I hard refresh page it tends to rebuild again, and once loaded, it rebuilds again, infinitively. |
Same issue here: When using next.js with express custom server, and hard refreshing the page in the browser a few times creates an infinite refresh loop in the browser: package.json: node.config.js : |
Can this issue be reopened? I had to completely move to Chrome in order to develop in Next.js. Anytime I try to open my project (dev mode only) in Firefox I get instant memory overload and must force reset. I never had any issues with Firefox before. Could we start examining the cause of this problem? I will try to explore what caused this issue to reproduce it. |
This has been happening to me but i can't remember on which version the problem started or if it hasnt been there since i started using Next on January |
Let's investigate this further. |
Same happening here: 1716321 ms: Mark-sweep 1358.7 (1406.0) -> 1366.3 (1407.0) MB, 453.3 / 0.0 ms [allocation failure] [GC in old space requested]. <--- JS stacktrace ---> ==== JS stack trace ========================================= Security context: 0x3e39fcfcfb39 FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory |
@nathanqueija do you remember at which point did memory leak appear? Do you use any custom config such as extended |
I'm experiencing too often that this become to bother me. Here is the dump
It usually happens every 1-2 hours in development mode. I know that tracing a memory leak is hard but any pointer where should I start to kill this bug would be appreciated |
As the op wanted to say that this is still happening to me, basically gave up on developing with firefox altogether. With chrome everything works fine for me. |
@nmaro oh so this issue is about memory leak in the browser? My issue is with the node process, and it happens no matter which browser I use (I develop on Chrome, Firefox) |
At least my issue, yes. I have to kill the browser in time or it blocks everything and have to restart my pc :) |
I wonder if this might be related to a memory leak we fixed before related to calling |
@timneutkens can you link to that issue related to |
I would also check what version of node you are on. That seemed to fix this exact issue for me. I moved from version 6 to 8 |
@TAQ2 just tried upgrading from 6 to 8 and memory leak is still present. Had to kill it before it fills my RAM completely and forces me to reboot by force. I tried few times to find issue but I couldn't because project is too big, so I am trying to see what others have enabled to build reproductive example. I also want to mention that leak is happening at the browser, not build process in my case |
It happens in a number of projects, in my current one I'm not using .babelrc. No nodemon. Here's my package.json: https://github.com/nmaro/sorters/blob/master/package.json |
This happened to me a few hours ago. I was utterly baffled cause I was only making superficial changes. Anyway, for me the problem was caused by accidentally thumbing the keyboard and creating a copy of I deleted the accidental rogue |
I just started trying out Next.js and the same thing is happening (Chrome as well as Firefox). I started in a clean directory, ran It happened after a couple of hours and several manual refreshes as well as restarts of the server as I was fiddling around with things, going through the docs and such. Not a single extra dependency was installed, no additional babel/webpack configs were made during the life of the project. See this gist for the complete life of the project, from inception to errors. |
Same problem here with chrome and firefox: .babelrc: {
"env": {
"production": {
"plugins": ["transform-remove-console"]
}
},
"plugins": [
"transform-decorators-legacy"
],
"presets": [
"next/babel",
"stage-0"
],
"ignore": []
} package.json: "scripts": {
"dev": "nodemon server.js --watch server.js --watch next.config.js --watch package.json"
} |
Interestingly, this stopped happening for me with the newest firefox/next. |
Firefox 60 has become completely unusable for Next development on this project: https://github.com/beedesignllc/glutenproject.com, especially the It's not long after loading the page and/or changes that Firefox gets super sluggish, requiring a Firefox restart. But Chrome works great. |
@nmaro Same here |
I hope this is fixed by #4639, not entirely sure as I couldn't reproduce. |
I think this is the same issue |
Sometimes when I modify a file, and next.js is rebuilding, and then quickly move to the browser and refresh the page, the browser's memory quickly goes up until the computer freezes.
Browser: Firefox 52.0
Next version: [email protected]
The text was updated successfully, but these errors were encountered: