-
Notifications
You must be signed in to change notification settings - Fork 682
%200 CPU usage with tons of flow processes #201
Comments
Same here |
1 similar comment
Same here |
Sorry about that. Do you have .flowconfig files in the projects you are editing? If not, Flow shouldn't run at all. If you do, I would expect 10-15 Flow processes (Flow starts worker processes), but I wouldn't expect that kind of CPU usage, let alone a crashed MBP. I use this every day to develop Nuclide and don't experience anything like that. What happens when you navigate to that project and run I do have some work planned to reduce the number of requests we send to Flow. Currently we spawn quite a few more processes than we need in certain instances, which could be contributing to the problems here. Could you also share some details about the projects you're working on? Even if they are very large, I wouldn't expect this sort of problem. If they are open-source, though, I could try to reproduce on that specific codebase. Also, what version of Flow and Nuclide do you have? |
Sorry, I found I didn't install flow, after I brew install flow, everything is OK. |
@h3l To confirm, your issue was just that Flow wasn't working, correct? I find it hard to believe that you had Flow processes eating up all your CPU and crashing your computer if you never installed Flow. |
I had flow installed for sure, and since I don't use it, I didn't have flowconfig in the project root. |
I just have a test, after I use and the
Atom really use a lot of CPU and memory!!!!! |
@oguzbilgic Could you provide the other details I requested? |
I believe I am also experiencing the same issue. I have been using Atom off and on for a couple months and now that I am dabbling in React Native development, I installed the Nuclide packages as instructed by the official page. Result: Checking for updates to my Atom/Nuclide packages is on the order of 10+ minutes of the same. I have a very fast OS X machine with an SSD. EDIT: Uninstalling all nuclide-* packages from atom has stopped this issue from occurring in my case. |
@nmote You are right. My apologies. |
Nuclide's high CPU issue should have been addressed with the UP release, see: http://nuclide.io/blog/2016/01/13/Nuclide-v0.111.0-The-Unified-Package/ - feel free to reopen if still applies. |
Anything strange in console.log? Flow version mismatch? Do you have .flowconfig? |
Console also shows this, not sure if related:
|
That's unrelated -- it's due to the experimental "enable structured type hints" setting being checked. I haven't implemented structured type hints for all types yet (one of the reasons it's labeled experimental) so for some it will log these errors. The UI for that was either just released or will be in the next release (don't remember off hand), so some types will be expandable trees. I think the best thing you could do is get the output of To be clear, it's expected that Flow will consume a lot of CPU when it first starts up. On the Nuclide codebase it takes in the ballpark of 30 seconds. Then, whenever you save it has to recompute some information. In large projects I've seen this take as long as maybe 5 seconds. However it should only be the Flow worker processes consuming any significant amount of CPU (10-15 of them, maybe). We've seen a few cases where the Flow client processes also consume CPU which is weird and can lead to your system locking up. The |
That memory usage is absurd. If you can reproduce please report on the Flow repository. |
Happens to me too. Both in Webstorm and VSCode on my MacBook Pro once I enable flow the CPU rockets to 200% usage |
Same problem |
Make sure all node modules are declared as libraries. This definitely has an impact on CPU usage:
|
Same problem. |
Same here on Linux, with emacs though. |
@abourget what version of flow are you running? |
That should be fixed in the latest nuclide release |
@mostafaeweda I'm also seeing this, but I'm a VS Code user. Is it an issue with Flow? Did anyone else find a fix? |
Just updated Nuclide today on my Linux machine and came across the same issue. Heaps of flow processes spawned as soon as I open any file and then freezes. Any file I open seems to spawn 8 worker processes and then freezes. Running this on an i7 7700 / 16GB RAM machine. After taking this screenshot, my system froze for a good two minutes. Not experiencing the issue with VSCode. Running flow@0.61.0 |
I'm using vscode on Windows 10 and i have noticed that even 15 - 20 minutes after closing the editor there still several processes of flow that consume cpu and don't seem to stop running. I've restarted, tried an alternative extension for flow in the marketplace, but to no avail. I don't seem to have problems with memory though. |
This might help, if u didn't try already, add to your
although this will also exclude flow types of installed packages and might break some rules |
I'm facing the same issue which makes the whole mac unusable (not just my VS Code) because I run out of available processes and so the only workaround is to run Ignoring node_modules results in breaking every import statement which is not a solution either. Sample
|
Not the best solution but u may specify in flow that will not read all files, only those with configuration info https://flow.org/en/docs/config/options/#toc-all-boolean either way this should be fixed. |
Seems to be a Flow issue and it still persists on 0.70.0. Really considering migrating a large project over to TypeScript because this is now a daily occurrence for us. |
Hmm same problem here, my computer is about to explode (flow:0.64.0 on osx 10.12.6 (16G29)).
If I kill these processes, at some point some similar will show up again (involving the same files). for id in $(ps aux | grep flow | awk '{if ($3 > 2) print $2}'); do kill -9 $id; done I don't know if this is related but one of my Edit: It looks like if I turn flow off for this big file (~6.5M), everything works just fine. This big file only contains a dictionary (something that you would normally load from a
I'll try to load that from a |
nuclide-flow is installed but disabled in my atom env. every time there is an update it gets enabled automatically by atom. As soon as it is enabled, It starts 10-15 flow processes and crashes my 2015 macbook pro. I just uninstalled nuclide-flow and flow.
The text was updated successfully, but these errors were encountered: